Home > database >  About the html img src
About the html img src

Time:09-27

I have a problem for html img, if I want to show the image, I write

<img src="https://static.wikia.nocookie.net/harrypotter/images/9/97/Harry_Potter.jpg/revision/latest?cb=20140603201724" />

it cannot display the image, but I can download the image, or new page can display, so what's wrong of my code

ps. I try to delete the cookie and also is it.

CodePudding user response:

I think it is correct.

Example:

<img src="https://static.wikia.nocookie.net/harrypotter/images/9/97/Harry_Potter.jpg">

CodePudding user response:

It has to be Like This, as this is the correct location of the image.

<img src="https://static.wikia.nocookie.net/harrypotter/images/9/97/Harry_Potter.jpg">

CodePudding user response:

It is because of the referer data being sent. Delete your cache and add referrerpolicy="no-referrer" so no referrer data would be sent. It seems to be working in firefox:

<img src="https://static.wikia.nocookie.net/harrypotter/images/9/97/Harry_Potter.jpg/revision/latest?cb=20140603201724" referrerpolicy="no-referrer"/>

  • Related