React-markdown render local images in html img tag

502 Views Asked by At

I'm using react-markdown with rehypeRaw plugin in Gatsby. And in my markdown file, im trying to render a picture which I have locally When I fetch images from the web its working so I'm assuming my src tag is not right?

index.mdx,

<figure class="figure text-center col-xs-12 col-sm-12 col-lg-12">
 <img src="346fd5bb-f993-4497-9036-da99fe9e1d76.png" class="img-fluid" alt="Running appwiz.cpl">
  <figcaption class="figure-caption text-center fw-normal text-dark">Running appwiz.cpl.</figcaption>
</figure>

enter image description here And this is my folder structure

1

There are 1 best solutions below

0
On BEST ANSWER

I moved all my images to static and I pass /static/asd.png it works.