Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
I see that new released Dawn theme didn't include lazysizes plugin for lazy loading of the images. The Debut theme has had it.
This is the code I see from main-collection-banner.liquid.
<img srcset="{%- if collection.image.width >= 165 -%}{{ collection.image | img_url: '165x' }} 165w,{%- endif -%}
{%- if collection.image.width >= 360 -%}{{ collection.image | img_url: '360x' }} 360w,{%- endif -%}
{%- if collection.image.width >= 535 -%}{{ collection.image | img_url: '535x' }} 535w,{%- endif -%}
{%- if collection.image.width >= 720 -%}{{ collection.image | img_url: '720x' }} 720w,{%- endif -%}
{%- if collection.image.width >= 940 -%}{{ collection.image | img_url: '940x' }} 940w,{%- endif -%}
{%- if collection.image.width >= 1070 -%}{{ collection.image | img_url: '1070x' }} 1070w{%- endif -%}"
src="{{ collection.image | img_url: '533x' }}"
sizes="(min-width: 1100px) 535px, (min-width: 750px) calc(50vw - 130px), calc(50vw - 55px)"
alt="{{ collection.title | escape }}"
loading="lazy"
width="{{ collection.image.width }}"
height="{{ collection.image.height }}"
>
Does new theme support lazy loading automatically by using attribute loading="lazy" If not, do I have to include lazysizes manually?
Solved! Go to the solution
This is an accepted solution.
Hey @tobychen,
The Dawn theme uses browser-level lazy loading and it doesn't require any additional plugins. You can read more about Browser level lazy loading from here.
Thanks!!
This is an accepted solution.
Hey @tobychen,
The Dawn theme uses browser-level lazy loading and it doesn't require any additional plugins. You can read more about Browser level lazy loading from here.
Thanks!!
Hey, does this mean that if I just stick in an "<img src=...>" I'll get lazyloading? or do I need to add something different?
Modifying footer.liquid, to be specific.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025