compress image meteor client side


#1

I am capturing images via cordova camera plugin (in string base64). The image size comes out to be around 500KB (i have set the quality to 30). But I need to further reduce the image size without changing its quality. Image of 100Kb should do well.

Any insights?

Thanks in advance.

Cheers!


#2

Well, you might want to look at WebP if you need better compression at similar quality.

But you will not get it down to 100 kB. Not a chance.


#3

A photo with a quality of 30 has a ton of information loss… I would personally look at turning up the quality and instead try rezising the images. Something like https://www.npmjs.com/package/resize-base64 might work well for your use case.


#4

Ok. So I have turned up the quality to 40, and allowed the user to crop/resize image before posting.
If user even crops a little bit, image size drops down to around 300kB, which isn’t perfect but still acceptable