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
- Save new size in the folder of the media management
- then run the command
bin/console media:generate-thumbnails
on the console to update the thumbnails for all images in the database - Clear shop cache
This 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
Add class lazysizes
to your block
The MIT License (MIT). Please see License File for more information.