From 89c0ff9855b1ae1b8797ce3d6e7bf55155a472b4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 19 May 2018 21:05:42 -0600 Subject: [PATCH] Add image optimizer config --- config/image-optimizer.php | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 config/image-optimizer.php diff --git a/config/image-optimizer.php b/config/image-optimizer.php new file mode 100644 index 000000000..241dc199b --- /dev/null +++ b/config/image-optimizer.php @@ -0,0 +1,53 @@ + [ + + Jpegoptim::class => [ + '-m75', // set maximum quality to 75% + '--strip-all', // this strips out all text information such as comments and EXIF data + '--all-progressive', // this will make sure the resulting image is a progressive one + ], + + Pngquant::class => [ + '--force', // required parameter for this package + ], + + Optipng::class => [ + '-i0', // this will result in a non-interlaced, progressive scanned image + '-o7', // this set the optimization level to two (multiple IDAT compression trials) + '-strip all', + '-quiet', // required parameter for this package + ], + + Svgo::class => [ + '--disable=cleanupIDs', // disabling because it is know to cause troubles + ], + + Gifsicle::class => [ + '-b', // required parameter for this package + '-O3', // this produces the slowest but best results + ], + ], + + /* + * The maximum time in seconds each optimizer is allowed to run separately. + */ + 'timeout' => 60, + + /* + * If set to `true` all output of the optimizer binaries will be appended to the default log. + * You can also set this to a class that implements `Psr\Log\LoggerInterface`. + */ + 'log_optimizer_activity' => true, +];