-1

So i'm working on a react project and i want to use an image which is stored in my computer i made the following code

<img src='my_image.png'/>

however it doesn't show in the browser as shown below see image

Doudou
  • 9
  • 2
  • Does this answer your question? [How do I reference a local image in React?](https://stackoverflow.com/questions/39999367/how-do-i-reference-a-local-image-in-react) – Jose Vf Oct 04 '21 at 03:03

1 Answers1

0

upload your images in your public folder then access it eg:public/images/p1.png

<img src='images/p1.png'/>

https://codesandbox.io/embed/amazing-bouman-x3mnr?fontsize=14&hidenavigation=1&theme=dark