LazyResize
https://github.com/magesuite/lazy-resize/tree/4.x
The module adds the possibility to lazy resize images.
Installation
This module is part of MageSuite metapackage
Optional installation when metapackage is not used
composer require "creativestyle/magesuite-lazy-resize" ^4.0.0Admin settings
Admin settings can be found in Stores -> Configuration -> MageSuite -> Images
The functionality is disabled by default when the module is installed.
Additional configuration for watermark image placement can be found in Content > Design > Configuration > [selected scope] > Product Image Watermarks
Image Offset X - offset of the image from the edge in the X axis in pixels
Image Offset Y - offset of the image from the edge in the Y axis in pixels
Backend
Add a lazy_resize section to the array returned by app/etc/env.php:
return [
// ... other Magento configuration ...
'lazy_resize' => [
'secret' => 'your-secret-value-here'
],
];Frontend
lazy-resize/etc/view.xml
<images module="Magento_Catalog">
<image id="product_page_image_large" type="image">
<width>1000</width>
<height>1000</height>
</image>
</images>