mirror of
https://github.com/processwire/processwire.git
synced 2025-08-25 23:56:41 +02:00
minor changes
This commit is contained in:
@@ -323,6 +323,7 @@ class ImageSizerEngineGD extends ImageSizerEngine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// write to file(s)
|
// write to file(s)
|
||||||
|
if(file_exists($dstFilename)) $this->wire('files')->unlink($dstFilename);
|
||||||
$result = false;
|
$result = false;
|
||||||
switch($this->imageType) {
|
switch($this->imageType) {
|
||||||
|
|
||||||
@@ -414,6 +415,7 @@ class ImageSizerEngineGD extends ImageSizerEngine {
|
|||||||
if(!function_exists('imagewebp')) return false;
|
if(!function_exists('imagewebp')) return false;
|
||||||
$path_parts = pathinfo($filename);
|
$path_parts = pathinfo($filename);
|
||||||
$webpFilename = $path_parts['dirname'] . '/' . $path_parts['filename'] . '.webp';
|
$webpFilename = $path_parts['dirname'] . '/' . $path_parts['filename'] . '.webp';
|
||||||
|
if(file_exists($webpFilename)) $this->wire('files')->unlink($webpFilename);
|
||||||
return imagewebp($im, $webpFilename, $quality);
|
return imagewebp($im, $webpFilename, $quality);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user