How to make my home page lazy load?

Solved

How to make my home page lazy load?

vcockerham2002
Excursionist
35 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 14

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.

- If this solution helped you out, please consider accepting it as a solution and giving it a thumbs-up. Your feedback is valuable to me and the community!
- If you're feeling extra generous, you can always buy me a coffee . Your support helps fuel my Shopify knowledge and keeps the solutions flowing!
- You can also follow more tips and tricks from my blog.

View solution in original post

Reply 1 (1)

nvchien
Shopify Partner
55 23 14

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.

- If this solution helped you out, please consider accepting it as a solution and giving it a thumbs-up. Your feedback is valuable to me and the community!
- If you're feeling extra generous, you can always buy me a coffee . Your support helps fuel my Shopify knowledge and keeps the solutions flowing!
- You can also follow more tips and tricks from my blog.