This plugin has built-in Lazyloading with auto generated sizes for best fitting sizes.
Download the plugin from the release page and enable it in shopware.
composer require frosh/lazy-sizes
Run npm install
in src/Resources/app/storefront
within the plugin directory
download latest release and upload into admin: https://github.com/FriendsOfShopware/FroshLazySizes/releases/latest/download/FroshLazySizes.zip
bin/console media:generate-thumbnails
on the console to update the thumbnails for all images in the databaseThis might be useful to optimize loading images above the fold
or if you don't like to use the plugin for specific images or tooltip.
Add variable lazysizes
with value false
before using sw_thumbnails
in the template.
Add css class no-lazysizes
to your sections
Add css class no-lazysizes
to your block
no-lazysizes
of sections class in blockAdd class lazysizes
to your block
The MIT License (MIT). Please see License File for more information.