Troubleshooting
Contents
Lazy Load
In order to make lazy load to work you need to apply the following changes into your slider:
-
Use
data-lazy
attribute instead ofsrc
<div data-mage-init='{"slick": {"slidesToShow": 1, "swipeToSlide": true}}'> <img data-lazy="{{media url='wysiwyg/sky-skyline-buildings-new-york.jpg'}}" alt="" /> <img data-lazy="{{media url='wysiwyg/pexels-photo-28452.jpg'}}" alt="" /> </div>
-
Wrap each image into
div
<div data-mage-init='{"slick": {"slidesToShow": 1, "swipeToSlide": true}}'> <div><img data-lazy="{{media url='wysiwyg/sky-skyline-buildings-new-york.jpg'}}" alt="" /></div> <div><img data-lazy="{{media url='wysiwyg/pexels-photo-28452.jpg'}}" alt="" /></div> </div>
That’s all.