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.

Markdown relative image paths

See original GitHub issue

🐛 Bug Report

In /docs/myDoc.md

![text](./assets/image.png)

This should be able to display an image in "/docs/assets/image.png`


Potential solution:

  • MDX transpiles to <img src="./assets/image.png"/>
  • we should find a way to make it transpile to <img src={require("./assets/image.png").default}/>

Note, this kind of trick probably exist in Gatsby codebase, so it’s worth taking a look

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
anshulrgoyalcommented, Jul 16, 2020

I fixed it and created a PR

2reactions
anshulrgoyalcommented, Jul 15, 2020

ok i will create a POC.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to make relative link to image in a markdown file ...
No, the relative URL to an image from markdown doesn't work, so you'll have to stick with the long, static URL:.
Read more >
Markdown image links with relative paths that navigate back ...
Markdown image links with relative paths that navigate up (..\) are not displayed in the Markdown Preview. When I press the control key...
Read more >
Using Relative Paths in Markdown Images With Next.JS
A guide to using relative paths for images inside Markdown in your Next.js blog. Transform relative paths to absolute ones using your own ......
Read more >
Markdown relative link to image and other readme does ... - Jira
I created a folder called screenshots and let my README.md file point to its relative path. It worked as expected. ![Launcher Screen](screeshots/1.png).
Read more >
Markdown preview doesn't show image from <img> if relative ...
Markdown preview doesn't show image from <img> if relative path was used ; N · IDEA-273698 Converting md images to html keeps related...
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