Shopify themes, liquid, logos, and UX
I am trying to get my site to stop lazy loading images as its slows down my store speed, but I can't find the code in the Spotlight theme I am using to fix that, nor do I know of any other way to stop the images from lazy loading. Any help would be appreciated.
Hi @Runner
You can do that by finding and removing this part of code loading="lazy" or loading: 'lazy' from liquid files
- Found this helpful? Hit "Like" and "Accept as Solution"! - Feeling generous. ☕ Buy me coffee!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify
Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Which liquid files would have those parts of the code? I can not find those parts of the code in my theme.liquid
To clarify on my side, my store's theme, Spotlight, doesn't have the exact lines of loading="lazy" or loading: 'lazy' in any of its liquid files, so I don't know if it would be in another line of code that would stop the lazy loading for images? Or if it's part of a Javascript file?
Hi, you can see theme in listed file below:
- Found this helpful? Hit "Like" and "Accept as Solution"! - Feeling generous. ☕ Buy me coffee!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify
Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Hello @Dan-From-Ryviu!
I appreciate the further guidance, I have found the code in those pages and have removed it, but I am not sure if that has exactly worked as, according to Google Lighthouse, the images are still being lazy loaded. Thoughts on this?
Which images? Could you share the link to your page?
- Found this helpful? Hit "Like" and "Accept as Solution"! - Feeling generous. ☕ Buy me coffee!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify
Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
It would be the first few images, that I see are the problem.
Try using this script and place it in your theme.liquid file
Log in to Your Shopify Admin:
Navigate to Themes:
Access Theme Code:
Locate the theme.liquid File:
Edit the theme. liquid File:
By following these steps, you can access and edit the theme.liquid file in your Shopify store.
<script>
$(document).ready(function() {
// Remove the standard lazy loading attribute
$('img[loading="lazy"]').each(function() {
$(this).removeAttr('loading');
});
// Remove custom lazy loading attribute (e.g., data-lazy)
$('img[data-lazy]').each(function() {
$(this).removeAttr('data-lazy');
});
});
</script>
Note: make sure you check the attribute in the image tag for lazy load then replace that attribute in the script this will remove all lazy load attribute from the page
-If this solution helps you, kindly LIKE THIS REPLY and MARK AS A SOLUTION OR
-If you need an expert Shopify developer for customization and development, feel free to contact me.
Email: Mehran.ali5300@gmail.com
WhatsApp: +92 343 0211536
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025