Skip to content

Commit

Permalink
Disabled WebP by default, changed image quality and enabled optimizer…
Browse files Browse the repository at this point in the history
…s for production only
  • Loading branch information
bymayo authored Jun 25, 2020
1 parent 2350ac1 commit a821c38
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions config/imager-x.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
'pngCompressionLevel' => 0,
'resizeFilter' => 'lanczos',
'hashPath' => true,
'useCwebp' => true,
'useCwebp' => false,
'cwebpPath' => '/usr/bin/cwebp',
'cwebpOptions' => '-q 95',
'cwebpOptions' => '-q 90',
'optimizeType' => 'job',
'optimizers' => ['jpegoptim', 'jpegtran', 'optipng', 'gifsicle'],
'optimizers' => null,
'optimizerConfig' => [
'jpegoptim' => [
'extensions' => ['jpg'],
'path' => '/usr/bin/jpegoptim',
'optionString' => '--strip-all -m85 -o -p'
'optionString' => '--strip-all -m90 -o -p'
],
'jpegtran' => [
'extensions' => ['jpg'],
Expand All @@ -41,7 +41,7 @@
'pngquant' => [
'extensions' => ['png'],
'path' => '/usr/bin/pngquant',
'optionString' => '--strip --skip-if-larger --quality=80-85 --speed 1'
'optionString' => '--strip --skip-if-larger --quality=85-90 --speed 1'
],
'gifsicle' => [
'extensions' => ['gif'],
Expand All @@ -50,14 +50,9 @@
]
]
],
'dev' => [
'useCwebp' => false,
'optimizers' => null
],
'staging' => [
'useCwebp' => false,
'optimizers' => null
],
'dev' => [],
'staging' => [],
'production' => [
'optimizers' => ['jpegoptim', 'jpegtran', 'optipng', 'gifsicle'],
]
];

0 comments on commit a821c38

Please sign in to comment.