Donaldcwl / browser-image-compression

Image compression in web browser
MIT License
1.3k stars 160 forks source link

Larger file size after compression. #48

Closed josh08h closed 4 years ago

josh08h commented 4 years ago

I'm seeing the file size of a jpeg increase from 1234610 bytes to 2346328 bytes - I've left the 'quality' config option as default.

Could you explain why I am seeing such a large increase in size after compression?

Thanks

Donaldcwl commented 4 years ago

@josh08h Would you mind to upload the image file for us to reproduce the issue?

josh08h commented 4 years ago

Hi @Donaldcwl

Image details: image

Here is the raw image that is uploaded: timj-ots0EOYuGtU-unsplash

console.log(origFile.size) // 1234610
const blob = await imageCompression(origFile, { maxWidthOrHeight: 3000 });
console.log(blob.size) // 2346328
Donaldcwl commented 4 years ago

@josh08h It is fixed in v1.0.9

josh08h commented 4 years ago

Perfect.. tested and it works.

Thanks for the quick turnaround @Donaldcwl .