Image path when adding file to mkdocs #7329
Replies: 3 comments 3 replies
-
Hello @WilliamPrvz,
and has a path to an image like this ![image_alt](filename/media/image.jpeg) then the path will be resolved relatively as:
what it does is basically:
You didn't provide a full example, but assuming the ![image_alt](media/image.jpeg) to create
or ![image_alt](../media/image.jpeg) to create
|
Beta Was this translation helpful? Give feedback.
-
I put a screenshot of my workplace so you could understand better the issue I got. |
Beta Was this translation helpful? Give feedback.
-
Ok, after investigation the issue arise because of the html. Without html it works fine. Not sure how to solve this. |
Beta Was this translation helpful? Give feedback.
-
I haven't fully understood how image path are handled in mkdocs. I have a standalone
filename.md
file that have images at the path:filename/media/image1.png
It is displaying the image correctly.
But when I import both those file in mkdocs in the same folder under docs. I get 404 error for those images.
"GET /Subfolder/filename/filename/media/image1.jpeg HTTP/1.1" code 404
I don't understand why this time filename is repeated twice.
Of course if I remove the path as follow:
media/image1.png
Then the images are found and displayed correctly.
Beta Was this translation helpful? Give feedback.
All reactions