How to make my home page lazy load?

Solved

How to make my home page lazy load?

vcockerham2002
Excursionist
33 0 1

My page speed is very slow and I have read that implementing lazy load may help.  Im looking for a step by setp on how to add this.  Does Dawn theme automatically lazy load?

Accepted Solution (1)

nvchien
Shopify Partner
55 23 13

This is an accepted solution.

Hi @vcockerham2002,

 

The Dawn theme has lazy loading support by default.

To integrate lazy loading of images or iframes, you can use the HTML loading="lazy" attribute. So your HTML code might look like this:

<img loading="lazy" src="image.jpg" alt="..." />
<iframe loading="lazy" src="video-player.html" title="..."></iframe>

 

You can read more about lazy loading here: https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading

Hope this helps.

View solution in original post

Reply 1 (1)

nvchien
Shopify Partner
55 23 13

This is an accepted solution.

Hi @vcockerham2002,

 

The Dawn theme has lazy loading support by default.

To integrate lazy loading of images or iframes, you can use the HTML loading="lazy" attribute. So your HTML code might look like this:

<img loading="lazy" src="image.jpg" alt="..." />
<iframe loading="lazy" src="video-player.html" title="..."></iframe>

 

You can read more about lazy loading here: https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading

Hope this helps.