mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 20:11:46 +02:00
add property and method for webpAdd
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user