Hi all,
Shopify rookie here.
Having issues with lazy loading of 2 pictures specifically on this page:
https://joice.dk/products/la-petite-pakken
When I run pagespeed insights it is telling me that the two pictures with the girl in the blue dress are not lazy loaded which is adding a whopping 1,6 seconds to the load time of this important product page.
I can for the life of me not understand why these two pictures are not being lazy loaded since it “normally” works automatically in dawn.
Can someone point me in the right direction?
Hello @Pete_Hegn ,
As we checked the Lazy loading functionality is not added in the product gallery section.
Lazy loading is natively supported by nearly all browsers now: https://caniuse.com/loading-lazy-attr
Instead of using javascript which adds page load and processing, one can now simply add loading=“lazy” to the <img tag.
Thanks to you both.
Where do I find the code for those product pictures?
Have checked all “img” code in the main-product.liquid and it seems as if loading=“lazy” is added all over anyway.
I’m not sure where the code for that is in the Dawn theme sorry. You should be able to track it down by drilling down into include templates.