'Trying to render a markdown file with images in react
Im trying to render a Markdown file in my react app.
Im using the react-markdown library and converting the MD to text using the following:
useEffect(() => {
fetch(markdownfile).then((response) => response.text()).then((text) => {
setmarkdown(text)
})
})
The above is saving my variable into a state called markdown and Im then trying to render it using:
<ReactMarkdown content= {markdown} />
Its rendering fine but all my images are showing up like this:

could someone please help me with how to render images and where I would need to store it locally
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|