warCommander
warCommander

Reputation: 449

Images not showing in React where the src is correct

Hey I have a weird issue in react images. Some images are not showing and some are showing.

This is my simple implementation:

<img src={item?.media?.url} />

and when I check the console and then copy the src, the image opens normally. So the url isn't the problem

enter image description here

Upvotes: 0

Views: 1546

Answers (2)

Alisson Leal
Alisson Leal

Reputation: 194

Looks like you're trying to hotlink an Instagram image.

You can try downloading the image and then displaying it, or you can just embed the Instagram post

Upvotes: 1

awedis
awedis

Reputation: 26

It seems your URL is broken, cause the way your using it is correct, make sure by clicking on the link, a new tab should open showing the actual image

And make sure the extension of the image is being added, cause on the image that you shared, there is no valid image extension in the URL (.png, .jpg, etc..)

Upvotes: 0

Related Questions