Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.4 KB

readme.md

File metadata and controls

50 lines (30 loc) · 1.4 KB

Optimize Catalog images with Magento2

Based on Spatie Image Optimizer.

This package adds 2 new Image Adapters to Magento2 in Store -> Configuration -> Advanced -> Developer -> Image Processing:

  • GD2 + Optimizer
  • ImageMagick + Optimizer

By using either of those instead of the default, the images will be automatically optimized.

Note: This is an alpha package, use with caution.

Installation

You can install this module via composer:

composer require fruitcake/magento2-image-optimizer:"0.1.x@dev"

Enable the module (and reset cache/di etc)

php bin/magento module:enable Fruitcake_ImageOptimizer

You can now select and Image Adapter that includes the Optimizer.

Before images can be optimized, you will need to install the Optimizers as described in https://github.com/spatie/image-optimizer#optimization-tools

Usage

When you upload new images, they will be processed using the Adapter. If you want to make any changes, you can delete your cache and re-generate the thumbnails

php bin/magento catalog:images:resize

Todo

  • Process WYSIWYG images
  • Command to re-generate existing images or process directories

Security

If you discover any security related issues, please email [email protected] directly.

License

The MIT License (MIT). Please see License File for more information.