Rendering of inline images with relative paths is not working
See original GitHub issueThe viewer panel does not render images that are in a path relative to the file being edited. It does render remote images just fine, however. Examples have been included that demonstrate a failed render and a successful render. In both cases, the Export/HTML command will produce a document that is able to render in a browser since the links are properly formatted in both example cases.
Example1 - render failure:
- Image exists in a relative directory: ./images
- File target for the markdown link: ./images/someImage.png
- Goal - render the image inline in the viewer panel
- Markdown -
 - Result - Image is not rendered; an [X] placeholder is there instead
Example2 - render success:
- Image exists at a remote HTTP site: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png
- Goal - render the image inline in the viewer panel
- Markdown:
 - Result - Image is rendered without problems
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
img tag not working with relative path in src
Inspect the img element, right-click on the src and Open image in new tab to see the url that it's trying to get....
Read more >Images not rendering using relative paths (#23467) · Issues
Summary Relative images aren't being reproduced from the same folder. I have a documentation repository with subdirectories. In one of the.
Read more >How to use relative paths for inserting inline images (CK ...
I use CK Editor to insert images in bookpages. I extended the system by Inline Image responsive module to have the chance to...
Read more >Materials - image location relative paths, not absoulte
I wrote to them inquiring about the option to link material jpg/png files using relative paths instead of absolute. I work remotely on...
Read more >Support <img> and <video> tag with src relative path format
Use case or problem. For my vault I have a subdirectory of images. Standard markdown works but if I try and wrap this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Neither GitHub’s Markdown renderer, nor Pandoc support “file:///” URI (security concerns?) Thus, requiring local files to be referred with “file” scheme makes Markdown files not really portable.
Please allow bare file paths (or “,/path”) in the image statements
Hey @andrewanswer
Thanks a lot ^^ Yeah, when I worked on the fix for this I thought about that. But the parsing made it way easier with the file:/// prefix. But I’ll keep this on my desk to fine-tune the parser and renderer accordingly.
Cheers