Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Picture in the WIKI #4376

Closed
a7hybnj2 opened this issue Jul 5, 2018 · 8 comments
Closed

Allow Picture in the WIKI #4376

a7hybnj2 opened this issue Jul 5, 2018 · 8 comments
Labels
Milestone

Comments

@a7hybnj2
Copy link

a7hybnj2 commented Jul 5, 2018

I have tired several ways to make images show up in the wiki pages. Adding pictures to the markdown pages of the project.git is easy and I think the wiki should work the same way.

@jonasfranz
Copy link
Member

You can add pictures and other files via git. Simply clone the wiki git repo, add your changes and push. You can reference those files by there relative path. For example gitea.png => gitea.png.

While testing this I discovered a bug which results in a wrong image link. I will send in a PR to fix this.

@lunny
Copy link
Member

lunny commented Jul 6, 2018

@JonasFranzDEV Is this fixed by #4377 ?

@jonasfranz
Copy link
Member

The bug is fixed. But maybe @a7hybnj2 intended to have a easier way of uploading images to wiki. If this is true, @a7hybnj2 please create a new issue for that.

@a7hybnj2
Copy link
Author

a7hybnj2 commented Jul 7, 2018

No I did not mean to make it easier. I did indeed upload pictures to the wiki via git and referenced those pictures with MD in the wiki files. This resulted in a logon popup to be displayed while accessing that page. When moving the same image and md file to my main project.git directory I was not prompted for a logon.

@SohnyBohny
Copy link
Contributor

Images in wiki are still not working for me.
Using version 1.5.0-rc2 the URL includes 'raw' but I get http error 404 when accessing the image.

@mattandneil
Copy link

mattandneil commented Feb 3, 2020

This works in Gitea version 1.10.2:

  1. Save a new wiki page
  2. Clone the wiki repository (http://localhost/org/repo.wiki.git)
  3. Commit an image into the root directory and push to remote
  4. Edit the wiki page and use the following markup: ![title](../raw/image.jpg)

@jhughes2112
Copy link

At least in my case, this works ONLY while in the Preview mode on the Wiki page editor. As soon as you go to the actual wiki page, it is a 404. Any idea how to get this link to work all the time?

@jhughes2112
Copy link

Reporting back... Solved my own problem. At least in my config, the preview shows up fine with one set of '../' but does not work when showing the page itself. If I add '../../' the preview stops working but the page itself works fine.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants