advanced-cropper / vue-advanced-cropper

The advanced vue cropper library that gives you opportunity to create your own croppers suited for any website design
https://advanced-cropper.github.io/vue-advanced-cropper/
Other
931 stars 130 forks source link

The cropped images is getting 5x more heavy then the original #196

Closed gustavopradoreis closed 2 years ago

gustavopradoreis commented 2 years ago

Hi guys, i'm using the plugin in my application, and i'm facing a big problem, the cropped image is getting at least 5x more size then the original, example:

I uploaded a image with 167KB, after the crop the image has with 553KB.

Is some config i have to change to keep the size of the original image? or is something i'm doing wrong, someone can help me?

Norserium commented 2 years ago

@gustavopradoreis, try this my answer. It might be helpful.

gustavopradoreis commented 2 years ago

Hi everyone, @Norserium helped me, we talked in telegram. The problem was the image quality, after setting manually the quality to 0.75, i was able to get my image in almost the same size, here an example:

newTab.document.body.innerHTML = `<img src="${result.canvas.toDataURL(
  this.image.type,
  0.75
)}"></img>`;