mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 02:04:35 +02:00
Fix issue processwire/processwire-issues#1209
This commit is contained in:
@@ -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);
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user