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.:

product.info.details

 - Block template file name. e.g.:

Vendor_Module::folder/file.phtml

 - Block class name, e.g.:

\Magento\CatalogWidget\Block\Product\ProductsList\Interceptor

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

<!-- MAGEFAN_LAZY_LOAD -->

Example:

Magento 2 Image Lazy Load