Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

263
Vistas
How To show this instagram image in <img> tag

I have this link from Instagram API Documentation from rapidapi:

https://scontent.cdninstagram.com/v/t51.2885-15/e35/269712310_436481731535085_8695389625620774366_n.jpg?se=7&_nc_ht=scontent.cdninstagram.com&_nc_cat=109&_nc_ohc=HfWwIW5-x70AX9BJWBL&edm=APU89FABAAAA&ccb=7-4&ig_cache_key=MjczNDM4MTI4ODc3MDQwNTM0NQ%3D%3D.2-ccb7-4&oh=00_AT8uLNghm5TV3utSE-zgMc8906FeybBezkArruEr9yh8Jg&oe=61CB3215&_nc_sid=86f79a

when i put this link in the image tag it gives me an error:

"GET https://scontent.cdninstagram.com/v/t51.2885-15/e35/269712310_436481731535085_8695389625620774366_n.jpg?se=7&_nc_ht=scontent.cdninstagram.com&_nc_cat=109&_nc_ohc=HfWwIW5-x70AX9BJWBL&edm=APU89FABAAAA&ccb=7-4&ig_cache_key=MjczNDM4MTI4ODc3MDQwNTM0NQ%3D%3D.2-ccb7-4&oh=00_AT8uLNghm5TV3utSE-zgMc8906FeybBezkArruEr9yh8Jg&oe=61CB3215&_nc_sid=86f79a net::ERR_BLOCKED_BY_RESPONSE.NotSameOrigin 200"

Do you know guys how to fix this? How can i display the image in my website. Please if You Can Help!!

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Something like this:

<?php

$image = file_get_contents("https://scontent.cdninstagram.com/v/t51.2885-15/e35/269712310_436481731535085_8695389625620774366_n.jpg?se=7&_nc_ht=scontent.cdninstagram.com&_nc_cat=109&_nc_ohc=HfWwIW5-x70AX9BJWBL&edm=APU89FABAAAA&ccb=7-4&ig_cache_key=MjczNDM4MTI4ODc3MDQwNTM0NQ%3D%3D.2-ccb7-4&oh=00_AT8uLNghm5TV3utSE-zgMc8906FeybBezkArruEr9yh8Jg&oe=61CB3215&_nc_sid=86f79a");
$imageData = base64_encode($image);
echo '<img src="data:image/jpeg;base64,'.$imageData.'">';
about 4 years ago · Santiago Trujillo Denunciar

0

Sounds like a CORS problem to me. You can bypass CORS for img elements, I believe:

https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image

by giving the img element a crossorigin property valued 'anonymous':

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-crossorigin https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin

but I believe that if the property is present and the value isn't specified the default is anonymous.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda