Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I’ve been following some instruction I found online but am getting stuck on adding a class to image tag (step 3).
Does anyone know how to locate the image tag for the theme?
website: follownoonestore.com
theme: Label
Hi @Sensei_Ryan,
You need to add loading="lazy" to your img tag. You only add this loading lazy to the image that you want to load later or not on the top of the browser when the browser loads
<img src="image-link" alt="image-alt" loading="lazy">
Hello @Sensei_Ryan ,
Finding each “img” tag is quite complex as we are using multiple sections or snippets in the Shopify theme.
To get this issue resolved and implement Lazy loading properly first you need to write a custom code for selecting all “img” tags and then add this attribute loading="lazy" as shown in the below-provided code.
<img src="img_url" alt="img_alt" loading="lazy"/>
This will properly implement lazy loading. Let us know if you need any help with this.
Regards,
CedCommerce
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