How can I make product images the first thing to load on product pages?

How can I make product images the first thing to load on product pages?

Theo_Bee
Shopify Partner
33 0 9

Hi! I have noticed that sometimes my product images are slow to load, and everything else below the fold loads before the product images. This is not ideal. 

It would be amazing if the first product image could be the first thing to load in the page. 

Does anyone know how to do this?

Here is a link to a product page on my store: https://nuvocollection.com/products/antonella-flower-claw-in-burgundy-bliss

I have about 20 different product page templates. If there are any other details I can provide that would help in finding a solution just let me know!

Kind regards

Theo

Replies 7 (7)

Small_Task_Help
Shopify Partner
979 39 92

Hi,

Hope this will help

- Preload first product image using <link rel="preload">.
- To load first use loading="eager" for the first image.
- To improve speed enable loading="lazy" for other images.
- Optimize image size to reduce loading time.
Shopify's image optimizer example

<img src="{{ product.featured_image | img_url: 'large' }}" alt="{{ product.title }}" loading="eager">

- Move slow-loading content (videos, descriptions) below image.

To Get Shopify Experts Help, Click Here or E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert India
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad

Huptech-Web
Shopify Partner
1169 234 264

Hi @Theo_Bee 
Can you please add the CSS code below to theme.liquid

Goto current theme -> Edit code -> find theme.liquid add below code before </head>

<style>
body media-gallery:first-child {
    display: block !important;
}
</style>

Also, are you using any kind of app for slider?

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Theo_Bee
Shopify Partner
33 0 9

Hi - thank you so much for taking the time to reply! 🙂

Your solution definitely made the product images load quicker and first, but it made it so my slider for the product images didn't work anymore. 

And to answer your question: yes, I'm using an app for the image slider. It's called "Swipper"

Do you perhaps know of a way to make your code work with my slider app? 

Kind regards

Theo

Theo_Bee
Shopify Partner
33 0 9

By the way, here is an image of what I mean when I say the slider stopped working when I implemented the code:
Screenshot 2025-03-23 at 17.13.25.png

Huptech-Web
Shopify Partner
1169 234 264

Hi @Theo_Bee 
I have added the app to my test store and also checked the app's documentation but unfortunately, there are no options to load images fast. 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

DaisyVo
Shopify Partner
4385 486 579

Hi @Theo_Bee 

You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file base.css and add this code at the end of the file

 

media-gallerymedia-gallery {
    display: block !important;
}

 

Best

DaisyVo

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

Bundler-Manuel
Astronaut
956 47 110

Hi Theo @Theo_Bee  I wasn’t able to find a specific code or process for the product images to load first on the page but here’s a blog on how you could optimize your images to load much quicker in your store https://www.dash.app/blog/shopify-image-optimisation 

Emmanuel
Please let me know if it works by marking it as a solution!
Bundler - Product Bundles app, a great bundle app for Shopify, with glowing user testimonials and a free plan.