mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Allow WebP encoding effort of 0 (#3261)
This commit is contained in:
@@ -495,7 +495,7 @@ function webp (options) {
|
||||
if (is.defined(options.smartSubsample)) {
|
||||
this._setBooleanOption('webpSmartSubsample', options.smartSubsample);
|
||||
}
|
||||
const effort = options.effort || options.reductionEffort;
|
||||
const effort = is.defined(options.effort) ? options.effort : options.reductionEffort;
|
||||
if (is.defined(effort)) {
|
||||
if (is.integer(effort) && is.inRange(effort, 0, 6)) {
|
||||
this.options.webpEffort = effort;
|
||||
|
||||
Reference in New Issue
Block a user