mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #2118 add config setting animated_webp_compression_quality (default=70)
This commit is contained in:
@@ -638,12 +638,14 @@ class image_ext_imagick implements imageInterface
|
||||
|
||||
function set_compression_quality($quality)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if ($this->is_animated_webp)
|
||||
{
|
||||
// in cas of animated WebP, we need to maximize quality to 70 to avoid
|
||||
// heavy thumbnails (or square or whatever is displayed on the thumbnails
|
||||
// page)
|
||||
$quality = min($quality, 70);
|
||||
$quality = min($quality, $conf['animated_webp_compression_quality']);
|
||||
}
|
||||
|
||||
$this->add_command('quality', $quality);
|
||||
|
||||
@@ -925,6 +925,10 @@ $conf['derivative_default_size'] = 'medium';
|
||||
// EXIF/IPTC... from derivative?
|
||||
$conf['derivatives_strip_metadata_threshold'] = 256000;
|
||||
|
||||
// For animated webP files, to avoid heavy derivatives, set a specific quality,
|
||||
// different from derivatives.resize_quality
|
||||
$conf['animated_webp_compression_quality'] = 70;
|
||||
|
||||
//Maximum Ajax requests at once, for thumbnails on-the-fly generation
|
||||
$conf['max_requests']=3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user