Home > Software design >  react cant read the image json url content
react cant read the image json url content

Time:06-13

I have local json data's and I'm going to map through them as a problem react cant read image url while mapping it but when I import the images as something like logo or etc... it shows the image

enter image description here

enter image description here

enter image description here

CodePudding user response:

use require to import pictures

<img src={require(cat.img)}/>

CodePudding user response:

you can map images without importing you just have to put images in public folder

  • Related