All things Shopify and commerce
Hi!
How can I lazyload slider images?
I've lazyload other images in the site but i don't know how to do it with this string:
<div class="flexslider">
<ul class="slides">
{% for i in (1..6) %}
{% capture slide %}slide_{{ i }}{% endcapture %}
{% capture slide_link %}slide_{{ i }}_link{% endcapture %}
{% capture slide_img %}slide_{{ i }}.jpg{% endcapture %}
{% capture slide_alt %}slide_{{ i }}_alt{% endcapture %}
{% if settings[slide] %}
<li>
<a href="{{ settings[slide_link] }}" class="slide-link">
{{ slide_img | asset_url | img_tag: settings[slide_alt] }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
Thanks!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024