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

155
Vistas
V2 cropperjs with Vue doesn't allow image to take full height #954

I'm trying to use cropperjs v2 within my Vue app, but I can't find the option and way for cropper to take full width and height of the image that is being cropped.

Can you help me and point me to the resources where I can find how to make basically something like this: https://agontuk.github.io/vue-cropperjs/

Here is my code:

<template>
    <div>
        <img ref="cropperImage" :src="imageUrl" alt="Cropper Image." class="block max-w-full" />
    </div>
</template>

<script lang="ts">
import Cropper from 'cropperjs';
import { Component, Prop, Ref, Vue } from 'vue-property-decorator';

@Component
export default class ImageCropper extends Vue {
    @Prop({ type: String, required: true }) readonly imageUrl!: string;
    @Ref() readonly cropperImage!: HTMLImageElement;

    cropper: Cropper | undefined;

    mounted() {
        this.cropper = new Cropper(this.cropperImage);
    }
}
</script>

And it produces this:

image

For this image:

https://i.picsum.photos/id/586/1600/900.jpg?hmac=rEPQN9kLTvjDkNQEqYhLukHWcJlKUtTGl-u2hmgXIkc

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