-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] keep the same width and height, and reduce the quality only #127
Labels
Comments
Donaldcwl
added a commit
that referenced
this issue
Apr 12, 2022
…nd reduce the quality only options.alwaysKeepResolution (default: false) - keep the resolution (width and height) during compression and reduce the quality only (note that options.maxWidthOrHeight is still applied if set) re #127
Donaldcwl
added a commit
that referenced
this issue
Apr 12, 2022
…nd reduce the quality only options.alwaysKeepResolution (default: false) - keep the resolution (width and height) during compression and reduce the quality only (note that options.maxWidthOrHeight is still applied if set) re #127
Donaldcwl
added a commit
that referenced
this issue
Apr 12, 2022
…nd reduce the quality only options.alwaysKeepResolution (default: false) - keep the resolution (width and height) during compression and reduce the quality only (note that options.maxWidthOrHeight is still applied if set) re #127
Merged
v2.0.0 added options.alwaysKeepResolution, for example: const options = {
maxSizeMB: 1,
useWebWorker: true,
alwaysKeepResolution: true,
}
const compressedFile = await imageCompression(imageFile, options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: