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

125
Vistas
View instead of downloading an image in new chrome tab using JS

I am creating a chrome extension that will open a link to an image in a new tab.

However I am coming across links that will automatically download the image instead of viewing it in the new chrome tab.

I am using the following code to do create the new tab:

chrome.tabs.create({ url: url_to_open, active: false});

Example of "unviewable" image from vsco: "im.vsco.co/aws-us-west-2/de89e8/880500/627c05d3edd24e3c58174876/vsco_051122.jpg?w=749&dpr=1"

Is there any way to not automatically download the image but view it instead?

Thanks!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can simply create a link element that opens a new tab on click.

let ln = document.createElement('a');
ln.href = 'url here';
ln.setAtrribute('target', '_blank');
ln.click();
about 4 years ago · Juan Pablo Isaza 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