4

Why Instagram image URL does not work with HTML <img> tag?

<img src='https://instagram.fjai3-1.fna.fbcdn.net/v/t51.2885-15/273154298_119474150437980_8801290709408392534_n.jpg?stp=dst-jpg_e35_p1080x1080&_nc_ht=instagram.fjai3-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=7w4ERevjerIAX8hhoMk&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT9CrFcW-JrAfkLLgdIRlVlnE7lc0KspmLJDpPPy3CgP_Q&oe=62200913&_nc_sid=83d603' alt='scraped URL'>

but it is perfectly opening in the new tab.

Jax-p
  • 7,225
  • 4
  • 28
  • 58

2 Answers2

7

You can see error in your console: ERR_BLOCKED_BY_RESPONSE.NotSameOrigin 200. That's because response with the image has cross-origin-resource-policy: same-origin header. It means it works only on same origin (domain). Browser blocked it.

Jax-p
  • 7,225
  • 4
  • 28
  • 58
  • Any solution for this – Dhanesh Saini Feb 25 '22 at 08:34
  • Globally? No. That's up to the server owner. The most you can do is [disable CORS protection](https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome) in **your own browser**. – Jax-p Feb 25 '22 at 08:37
-3

Because there is nothing inside the tag, it has nothing to parse

RomanGoltsov
  • 115
  • 1
  • 5