In this Shopify Dev Tips video we discuss how-to add lazy loading to your Shopify site. Lazy loading is the act of loading assets only when they're needed instead of on initial page load which greatly improves site speed. We use the vanilla-lazyload JavaScript library to accomplish this. Note, I'm using my Workshop Advanced Gulp Workflow (used with WorkshopCLI) in this so to follow along you'll either need to use that or a different workflow that allows import/export syntax in JavaScript.
Vanilla Lazyload Github: https://github.com/verlok/vanilla-lazyload
Workshop Advanced Gulp Workflow: https://github.com/WorkshopCLI/workshop-advanced-gulp
Instagram: https://www.samthewebb.com/instagram
Start your free trial on Shopify today: https://samthewebb.com/shopify
WorkshopCLI NPM: https://www.npmjs.com/package/@workshop-cli/workshop-cli
My Personal website: https://samthewebb.com