question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rendering of inline images with relative paths is not working

See original GitHub issue

The 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 - ![Test](./images/someImage.png)
  • Result - Image is not rendered; an [X] placeholder is there instead

Example2 - render success:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
btbrootcommented, May 22, 2018

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

5reactions
neacommented, Apr 18, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found