-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Markdown relative image paths #3057
Comments
we can create a remark plugin for it and convert it to jsx before going to MDX. |
yes if you can try to create a poc that would be cool :) I'm not very familiar with remark/rehype |
ok i will create a POC. |
I have created the poc but I need some help with webpack. I used url-loader in require to load image but it creates a wired base64 with export default embedded in base65 string |
I fixed it and created a PR |
@anshulrgoyal So how do we use it? extra config required to support nested assets under docs dir? |
@softmarshmallow this feature is documented. For support, ask on Discord. Please clarify your question and show what you have tried in a sandbox/playground |
🐛 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:
<img src="./assets/image.png"/>
<img src={require("./assets/image.png").default}/>
Note, this kind of trick probably exist in Gatsby codebase, so it's worth taking a look
The text was updated successfully, but these errors were encountered: