mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 04:22:10 +02:00
cleaning and beautyfying
This commit is contained in:
@@ -1262,6 +1262,7 @@ abstract class ImageSizerEngine extends WireData implements Module, Configurable
|
||||
$options = array(
|
||||
'quality' => $this->quality,
|
||||
'webpQuality' => $this->webpQuality,
|
||||
'webpAdd' => $this->webpAdd,
|
||||
'cropping' => $this->cropping,
|
||||
'upscaling' => $this->upscaling,
|
||||
'interlace' => $this->interlace,
|
||||
|
@@ -413,8 +413,8 @@ class ImageSizerEngineGD extends ImageSizerEngine {
|
||||
*/
|
||||
protected function imSaveWebP($im, $filename, $quality = 90) {
|
||||
if(!function_exists('imagewebp')) return false;
|
||||
$path_parts = pathinfo($filename);
|
||||
$webpFilename = $path_parts['dirname'] . '/' . $path_parts['filename'] . '.webp';
|
||||
$path_parts = pathinfo($filename);
|
||||
$webpFilename = $path_parts['dirname'] . '/' . $path_parts['filename'] . '.webp';
|
||||
if(file_exists($webpFilename)) $this->wire('files')->unlink($webpFilename);
|
||||
return imagewebp($im, $webpFilename, $quality);
|
||||
}
|
||||
|
Reference in New Issue
Block a user