diff --git a/config/app/packages/image.yaml b/config/app/packages/image.yaml index 274b4a79e..cb0a000f8 100644 --- a/config/app/packages/image.yaml +++ b/config/app/packages/image.yaml @@ -40,10 +40,14 @@ ibexa: - { name: strip } liip_imagine: + default_filter_set_settings: + format: webp filter_sets: small: quality: 85 jpeg_quality: 85 + # format can also be defined per filter + #format: webp medium: quality: 85 jpeg_quality: 85 diff --git a/src/ezpublish_legacy/app/settings/image.ini.append.php b/src/ezpublish_legacy/app/settings/image.ini.append.php index ff829829b..6ba626279 100644 --- a/src/ezpublish_legacy/app/settings/image.ini.append.php +++ b/src/ezpublish_legacy/app/settings/image.ini.append.php @@ -2,11 +2,26 @@ [ImageMagick] IsEnabled=true -ExecutablePath=/usr/bin +ExecutablePath=/opt/local/bin Executable=convert PreParameters=+profile "*" [MIMETypeSettings] Quality[] Quality[]=image/jpeg;90 +Quality[]=image/webp;90 +# The global conversion rules +# Most will be converted to jpeg except gif and xpms +ConversionRules[] +ConversionRules[]=image/gif;image/png +ConversionRules[]=image/x-xpixmap;image/png +ConversionRules[]=image/webp;image/webp +# force aliases from jpeg originals to be generated as webp +ConversionRules[]=image/jpeg;image/webp +# force aliases from originals in any non-specified format to be generated as webp +#ConversionRules[]=*;image/webp +ConversionRules[]=*;image/jpeg +[ImageMagick] +QualityParameters[]=image/webp;-quality %1 + */ ?> diff --git a/src/ezpublish_legacy/app/settings/siteaccess/ngadminui/image.ini.append.php b/src/ezpublish_legacy/app/settings/siteaccess/ngadminui/image.ini.append.php index 0b0e307a5..a75c8917d 100644 --- a/src/ezpublish_legacy/app/settings/siteaccess/ngadminui/image.ini.append.php +++ b/src/ezpublish_legacy/app/settings/siteaccess/ngadminui/image.ini.append.php @@ -8,16 +8,20 @@ [small] Reference=original +# you can disable global ConversionRules for webp, and specify target mime type for each alias +MIMEType=image/webp Filters[] Filters[]=geometry/scaledownonly=100;100 [medium] Reference=original +MIMEType=image/webp Filters[] Filters[]=geometry/scaledownonly=200;200 [large] Reference=original +MIMEType=image/webp Filters[] Filters[]=geometry/scaledownonly=300;300 */ ?>