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
What I want to achieve is zoom the image till fill the cropped size