fixes #2118 add config setting animated_webp_compression_quality (default=70)

This commit is contained in:
plegall committed 2024-02-19 17:17:36 +01:00
1 parent 4adf36f2e5
commit 1000ae868e
2 files changed
+7 -1

No files matched your search

+3 -1
View File
@@ -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);