upload image dynamically in react js

I want to make a product presentation page where I retrieved the addresses of the images, then I have but the address that I retrieved it but the image does not upload (the link is correct).I found some source which said that you have to use require (‘../ image / name_image.jpg’) when I have but the code like it works but when I used list.image (variable) it does not work

the result that i got it enter image description here

the code that creates the image enter image description here

get data results enter image description here

file structure enter image description here

enter image description here

Answer

Add your image folder inside the public folder: public/image/
then use <img src="/image/m1.jpg" />

Leave a Reply

Your email address will not be published. Required fields are marked *