Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ngstack 901 webp support #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/app/packages/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion src/ezpublish_legacy/app/settings/image.ini.append.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

*/ ?>
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/ ?>