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

Question - Relative paths for images #94

Closed
sohnemann opened this issue Jun 8, 2020 · 3 comments
Closed

Question - Relative paths for images #94

sohnemann opened this issue Jun 8, 2020 · 3 comments

Comments

@sohnemann
Copy link

sohnemann commented Jun 8, 2020

Hey there,

how would one go about adding images to a document that are available in the filesystem?
I tried everything, but I just can't get it to work.

What I tried so far:
/index.md
/giphy.gif

Inside index.md:

![welcome2](giphy.gif)
![welcome2](/giphy.gif)
![welcome2](./giphy.gif)

But whatever I do, I always receive a 404.

When I checked the developer tools in Firefox,
I saw how the markdown files are retrieved:

/?&action=get_file_data&relative_path=index.md

When I replaced index.md with giphy.gif, It did load the image file.

@xy2z
Copy link
Owner

xy2z commented Jun 15, 2020

Are you using Docker?
If not, you could just add the images in the "public" folder, and your markdown example should work.

If you are using Docker, you could make a volume to the "public/img" dir and the change the image path in your markdown to eg. /img/giphy.gif

@sohnemann
Copy link
Author

Thanks, adding the volume for the public folder fixed it! :)
The whole configuration with Docker-Compose & Traefik got me a bit confused.

@xy2z
Copy link
Owner

xy2z commented Jun 15, 2020

Glad it's working 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants