compress image meteor client side

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!

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.

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.

2 Likes

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