Skip to content
Insights

Lighter websites

Product Pages for Small Shops: What Loads First

Product pages collect photo galleries, zoom, variant images, reviews and carousels. Load the main photo first and let the rest wait until it is wanted.

Sol Rudd6 min read

Diagram: a product page where the main photo loads first, marked with a green tick, while extra photos and widgets lower down wait in a separate box

The product page is where a small shop makes its sale. Over time it also tends to collect extras: six photos instead of one, a zoom feature, a different picture for every colour, a reviews widget and a “you may also like” carousel. Each is reasonable on its own. Together they can mean that a shopper on a phone downloads dozens of images and several scripts before they have even seen the price. This article looks at what really needs to load first, and what can wait until someone asks for it.

What a product page loads up front

By default, a browser loads every image in the page as soon as it can. MDN describes the default, eager, as loading the image “immediately, regardless of whether or not the image is currently within the visual viewport”. So a product page with a main photo, five more in a slider, eight colour variants and twelve recommended products may fetch all of them on the first load, even though a phone screen shows one.

A useful way to sort the page is into three groups:

  • Needed now: the main photo, name, price and the buy button.
  • Needed soon: the other photos, which people often swipe through.
  • Needed by some: zoom, other variants, reviews and recommendations further down the page.

The main photo: fast, not lazy

The main photo is usually the largest thing on screen, so it should arrive quickly. web.dev's lazy-loading guide is clear: “Don't lazy-load images that are likely to be in-viewport when the page loads, especially LCP images”. Largest Contentful Paint, or LCP, times the largest image, text block or video visible when the page opens, and on a product page that is usually the main photo. Its Fetch Priority guide adds that fetchpriority="high" can boost the priority of that image, while reminding readers that the attribute “is a hint, not a directive”.

Fast doesn't mean big. Offer the photo in several widths with srcset and sizes so a phone gets a phone-sized file; our guide to image weight covers sizing and formats in more detail.

Extra photos, zoom and variants

  • The photo slider. web.dev's Fetch Priority guide shows a carousel where the first image has high priority and the others low, so the hidden slides don't compete with the one being seen. Since Chrome 121, lazy-loaded images in horizontal carousels use the same distance thresholds as images further down the page, according to web.dev, so loading="lazy" on later slides is also worth trying.
  • Zoom. A zoom feature often relies on a very large version of the photo. That file only needs to load when someone actually taps or hovers to zoom. Ask whether your theme fetches the zoom image on request or with the page.
  • Variant images. Load the photo for the colour or size that is selected, and fetch the others when a shopper picks them. Hiding the other photos with CSS is not enough on its own: an ordinary image is fetched even when it is hidden. web.dev's note applies to images marked loading="lazy": Chrome, Safari and Firefox then don't load them while they are hidden with display: none, but images hidden with opacity: 0 are still downloaded. So ask for lazy loading on variant photos, or for the theme to add each photo only when its variant is picked.

Whichever approach your theme takes, give every image a width and height. MDN explains that this lets the browser reserve space before the image arrives, and that it is especially important for lazy-loaded images.

Reviews and recommendations

Reviews widgets and recommendation carousels are often third-party tools with their own scripts, styles and images. web.dev's guide to loading third-party JavaScript lists several options, and the first is the simplest: “Remove it if it doesn't add clear value to your site.” For the ones you keep, it suggests loading third-party content “only when users first scroll to that section of the page”, and using defer for less critical scripts.

  • Show a star rating and review count near the price as plain text, and load the full reviews widget lower down, when the shopper reaches it or clicks “Read reviews”.
  • Keep recommendation carousels short, with small, lazy-loaded thumbnails.
  • Ask your provider whether they offer a lighter or delayed option before building one yourself.

Our articles on loading embeds on demand and finding unused JavaScript go further into click-to-load previews and script clean-up.

Check one product page

Pick a typical product, not your simplest. GreenTracer measures one first, uncached load with Google PageSpeed Insights on mobile and desktop and uses the heavier run; it doesn't scroll, click or accept cookie banners. So photos and widgets that wait for a swipe, a scroll or a click are not counted, while anything loaded up front is. Under the Sustainable Web Design Model v4, every megabyte removed from that first load lowers the estimate by about 0.148 g CO₂e per page view.

  1. In Chrome DevTools' Network panel, tick “Disable cache”, select the Img filter and reload. Count the images loaded before you touch anything.
  2. Make one change at a time, such as lazy-loading later slides, and reload to compare.
  3. Test zoom, variant switching and the reviews on a phone to make sure they still work.
  4. Check the page again and compare the bytes measured with the earlier report.

Sources

All articles

Check your own site

See the estimated carbon of one page view on your page, its grade, and whether your host is listed as green. It's free.

Check a website