Closed GeekaholicLin closed 2 years ago
v2.0.0 added options.alwaysKeepResolution, for example:
const options = {
maxSizeMB: 1,
useWebWorker: true,
alwaysKeepResolution: true,
}
const compressedFile = await imageCompression(imageFile, options);
Thanks for the awesome library for the image compression!
I noticed that the width/height of the image will be reduced to meet the maxSizeMB.
Is it possible to provide the option to keep the same width and height of the original image file and reduce the quality only?
https://github.com/Donaldcwl/browser-image-compression/blob/master/lib/image-compression.js#L95-L96