Type
magento2-module
Magento 2 Image optimizer wrapper build on https://github.com/spatie/image-optimize
magento2-module
MIT
None
None
None
None
None
This Magento 2 module is a wrapper based on the package Spatie Image optimizer.
composer require justbetter/magento2-image-optimizer
bin/magento module:enable JustBetter_ImageOptimizer
bin/magento setup:upgrade && bin/magento setup:static-content:deploy
bin/magento justbetter:imageoptimizer:optimizeall
to resize all images in the media folder.--jpg_compression="85"
--jpg_strip_all="1"
--jpg_all_progressive="0"
--png_quality_min_max="10-15"
--png_interlace="0"
--png_optimization_level="8"
The package will use these optimizers if they are present on your system:
Here's how to install all the optimizers on Ubuntu:
sudo apt-get install jpegoptim
sudo apt-get install optipng
sudo apt-get install pngquant
sudo npm install -g svgo
sudo apt-get install gifsicle
And here's how to install the binaries on MacOS (using Homebrew):
brew install jpegoptim
brew install optipng
brew install pngquant
brew install svgo
brew install gifsicle
The module is tested on magento version 2.2.x with Spatie image optimizer version 1.0.x
Please create a issue or a pull request.