I am facing issue while using Cropper.JS to upload and crop the images. Suppose I am uploading 70 kb file after using cropper tool it's size get increased and is 115KB and sometime it's also converting to MB's for some other file sizes.
Cropper.JS uploading file size issue
3.4k views Asked by Ritu Gupta At
2
There are 2 answers
0
On
If you are facing to size of cropped image problem, you can transform the cropped image to base64 and compress it by using the following code snippet (angular-cropperjs)
this.angularCropper.cropper.getCroppedCanvas().toDataURL('image/jpeg', (20 / 100));
Play with the second parameter of toDataURL()
method to adjust ratio compression.
You can find more information here.
From my understanding you should have to use newer version of cropper.