Hello, I am trying to add lazy loading in images in description by adding the class = “lazyloaded”.
However, images in the descriptions seems not to be affected by this class.
I can see from the rest of the images in the website that they are “lazyloaded”, but when I scroll down to the images in the description, they are all loaded already.
How to achieve this?
thanks
|
|
Hi,
You could add lazyload images manually, but you need to follow the this documentation:
https://github.com/aFarkas/lazysizes
We will add an automatic image lazyloading with the next version. Until then you can follow these steps to implement it:
1) Open system/vendor/BurnEngine/widget/ProductDescriptionSystemWidget.php
2) Find this line:
$content = str_replace('panel-heading', $title_classes, $content);
3) Insert this code right afterwards:
if ($this->themeData['system']['image_lazyload']) {
$content = $this->getThemeModel()->alignImagesAttributes($content);
}
P.S. Be aware that your description images have width and height inserted.
BR,
ThemeBurn team
|
|