To configure image lazy loading in Magento 2 you can install Magento 2 Image Lazy Load Extension by Magefan. Then navigate to Magento 2 Admin Panel > Stores > Configuration > Magefan Extensions > Lazy Load.

Magento 2 Image Lazy Load Configuration

Enable the extension by choosing "Yes" in Enabled select box and define blocks (Lazy Load Blocks text area) for which images should be loaded via lazyload.

In the Lazy Load Block field you can define:

 - Block name in the XML layout, e.g.:

 - Block template file name. e.g.:


 - Block class name, e.g.:


- To enable image lazy load for Magento 2 CMS Blocks, in the block content you should add this HTML comment:



Magento 2 Image Lazy Load