Media Gallery Image Optimization

The new Media Gallery provides an Image Optimization feature, which improves performance and decreases media file sizes on the storefront. This optimization is enabled by default and can be modified in the store configuration settings.

Configure image optimization

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In the left panel, expand Advanced and choose System.

  3. Expand Expansion selector Media Gallery Image Optimization and do the following:

    • Set Enable Image Optimization to Yes.
    • Enter the Maximum Width and Maximum Height values (in pixels) according to your needs..

Behaviour

When Media Gallery Image Optimization functionality is enabled, an optimized copy of an image is automatically inserted in the content from the Media Gallery instead of the original file.

Any time the Maximum Width and Maximum Heigh values are changed in the configuration, it updates all the existing optimized images that were previously inserted.

The Media Gallery Image Optimization requires media.gallery.renditions.update queue consumers to be running for regenerating optimized image when configuration is changed. See Manage message queues documentation for more details.