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

192
Vistas
How to resize an image from a url and then download it in reactjs

I have an api that links me directly to an image. When the User Clicks a button I want the image to be resized and then downloaded. Currently I'm using the file-saver npm package to download the image like so;

    const downloadImage = (url,width=0,height=0) => {
        console.log("downloading"+url)
        saveAs(url, 'image.jpg') // Put your image url here.
      }

This lets the user download the image however I'd like to resize the image and then prompt the user with a download if a non default width or height is used in the function. How can I achieve this?

about 4 years ago · Juan Pablo Isaza
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