1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 02:04:35 +02:00
This commit is contained in:
Ryan Cramer
2020-07-09 10:46:55 -04:00
parent 5b285ebc8c
commit f095f4aa77
2 changed files with 2 additions and 2 deletions

View File

@@ -1289,7 +1289,7 @@ abstract class ImageSizerEngine extends WireData implements Module, Configurable
$this->setWebpAdd($value);
break;
case 'webpOnly':
$this->webpOnly = (bool) $value;
$this->setWebpOnly($value);
break;
case 'cropping':
$this->setCropping($value);

View File

@@ -272,7 +272,7 @@ class ImageSizerEngineGD extends ImageSizerEngine {
// current version is already the desired result, we only may have to compress JPEGs but leave GIF and PNG as is:
if(!$isModified && !$this->webpOnly && ($this->imageType == \IMAGETYPE_PNG || $this->imageType == \IMAGETYPE_GIF)) {
if(!$isModified && !$this->webpOnly && !$this->webpAdd && ($this->imageType == \IMAGETYPE_PNG || $this->imageType == \IMAGETYPE_GIF)) {
$result = @copy($srcFilename, $dstFilename);
if(isset($image) && is_resource($image)) @imagedestroy($image); // clean up
if(isset($image)) $image = null;