Lossless encoding for WebP and PHP 8.1+
This commit is contained in:
parent
70e01c4f79
commit
1cf72c4706
1 changed files with 3 additions and 0 deletions
|
@ -71,6 +71,9 @@ class GDDriver extends DefaultDriver
|
|||
case 'jpg':
|
||||
$type = 'jpeg';
|
||||
case 'webp':
|
||||
if (defined('\\IMG_WEBP_LOSSLESS')) {
|
||||
$quality = \IMG_WEBP_LOSSLESS; // кодирование без потери качества
|
||||
}
|
||||
case 'avif':
|
||||
$args[] = $quality;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue