This is Magento 2 module implements the loading
attribute for lazyloading images. Details about this can be read from here: https://web.dev/native-lazy-loading/
composer require hmphu/m2-lazyload-native:dev-master
bin/magento module:enable HMP_LazyloadNative
bin/magento setup:upgrade
- Go to https://github.com/hmphu/m2-lazyload-native
- Download this module "Clone or download -> Download Zip"
- Unzip two modules in the folder app\code\HMP\LazyloadNative
- Run commands:
bin/magento module:enable HMP_LazyloadNative
bin/magento setup:upgrade
To enable the module please go to
Stores -> Configuration -> Advanced -> System -> Lazyload Image (native method)