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

816
Vistas
How to fit image to specific cropped area to only move with Cropper JS

I'm using cropper JS to resize images to a specific crop area. But when I upload a image that is lower than crop area, the image don't fit the area. I want to fit the image (height or widht) and only choose the crop area moving the image, like the facebook upload cover photo functionality.

Here is my actual code:

        const cropper = new Cropper(image, {
            viewMode: 0, 
            zoomable: false,
            movable: true,
            cropBoxResizable: false,
            cropBoxMovable: true,
            dragMode: 'move',
            data: {
                width: 1370,
                height: 385,
            },
        })

And I want this result like facebook

enter image description here

What I want to achieve is zoom the image till fill the cropped size

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