Download the PHP package justbetter/magento2-image-optimizer without Composer
On this page you can find all versions of the php package justbetter/magento2-image-optimizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download justbetter/magento2-image-optimizer
More information about justbetter/magento2-image-optimizer
Files in justbetter/magento2-image-optimizer
Package magento2-image-optimizer
Short Description Magento 2 Image optimizer wrapper build on https://github.com/spatie/image-optimize
License MIT
Informations about the package magento2-image-optimizer
Magento 2 Image Optimizer
This Magento 2 module is a wrapper based on the package Spatie Image optimizer.
Installation
composer require justbetter/magento2-image-optimizer
bin/magento module:enable JustBetter_ImageOptimizer
bin/magento setup:upgrade && bin/magento setup:static-content:deploy
Optimize all images in console
- Run
bin/magento justbetter:imageoptimizer:optimizeall
to resize all images in the media folder. - Additional parameters (will overwrite any option in the magento config):
--jpg_compression="85"
--jpg_strip_all="1"
--jpg_all_progressive="0"
--png_quality_min_max="10-15"
--png_interlace="0"
--png_optimization_level="8"
Optimization tools
The package will use these optimizers if they are present on your system:
Here's how to install all the optimizers on Ubuntu:
And here's how to install the binaries on MacOS (using Homebrew):
Configuration
- Options for the module are defined in the backend under Stores > Configuration > JustBetter > Image optimizer configuration.
- Possible options:
- Log the compression in the system.log
- Change compression of jpg files
- Change compression of png files
Compatibility
The module is tested on magento version 2.2.x with Spatie image optimizer version 1.0.x
Ideas, bugs or suggestions?
Please create a issue or a pull request.
Todo
Configurable options for compressionCompress all library images in console command
About us
We’re a innovative development agency from The Netherlands building awesome websites, webshops and web applications with Laravel and Magento. Check out our website justbetter.nl and our open source projects.
License
MIT