diff --git a/wire/core/ImageSizerEngine.php b/wire/core/ImageSizerEngine.php index 8f2edb91..cf625c2b 100755 --- a/wire/core/ImageSizerEngine.php +++ b/wire/core/ImageSizerEngine.php @@ -69,6 +69,14 @@ abstract class ImageSizerEngine extends WireData implements Module, Configurable */ protected $webpQuality = 90; + /** + * Also create a WebP Image with this variation? + * + * @var bool + * + */ + protected $webpAdd = false; + /** * Image interlace setting, false or true * @@ -915,6 +923,19 @@ abstract class ImageSizerEngine extends WireData implements Module, Configurable return $this; } + /** + * Set flag to also create a webp file or not + * + * @param bool $value + * + * @return $this + * + */ + public function setWebpAdd($value) { + $this->webpAdd = (bool) $value; + return $this; + } + /** * Given an unknown sharpening value, return the string representation of it * @@ -1178,6 +1199,9 @@ abstract class ImageSizerEngine extends WireData implements Module, Configurable case 'webpQuality': $this->setWebpQuality($value); break; + case 'webpAdd': + $this->setWebpAdd($value); + break; case 'cropping': $this->setCropping($value); break;