Product images are often the heaviest part of a WooCommerce store. A catalogue of large, uncompressed photos can slow every category and product page, hurting both rankings and sales. The good news is that image optimization is one of the most effective and least risky speed improvements. This is the process I use on client stores.
Start with the right dimensions
Most product photos straight from a camera are several thousand pixels wide and several megabytes in size. Product pages rarely display images larger than about 1200 to 1600 pixels, even with zoom. Resize images before upload to a consistent size, such as 2000 pixels on the longest side for zoomable products.
Use consistent proportions, such as square or 4:5, for all product images. Consistent sizes make galleries and category grids look tidy and prevent layout shift as images load. Set WooCommerce’s image sizes under Appearance > Customize > WooCommerce > Product images to match your theme.
Compress without visible loss
Compression reduces file size by removing data the eye does not notice. Lossy compression at a sensible quality level can cut file sizes dramatically with no visible difference for product photos. Lossless compression saves less but keeps every detail.
Image optimization plugins such as ShortPixel, Imagify, EWWW Image Optimizer and the image features in LiteSpeed Cache compress images automatically on upload and can bulk-optimise existing media. Test a few images at different settings and choose the lowest quality where you cannot see a difference.
- ResizeAround 2000 px max
- CompressLossy, visually identical
- WebP or AVIFWith fallbacks
- SrcsetRight size per screen
- Lazy loadNot the main image
- Alt textDescriptive
Use modern formats
WebP and AVIF produce much smaller files than JPEG and PNG at similar quality. All modern browsers support WebP, and AVIF support is now widespread. Optimization plugins can create WebP or AVIF versions and serve them to browsers that support them, with JPEG fallbacks for others.
My guide to WebP vs AVIF vs JPEG compares the formats. For most stores, WebP is a safe default and AVIF can save more where supported. Check that your CDN or server delivers the correct format and that images still look right.
Responsive image sizes
WordPress creates several sizes of each image and uses srcset so browsers download the smallest suitable version for the screen. A phone should never download a 2000-pixel image to display it at 400 pixels wide. Check that your theme outputs srcset and sizes attributes for product images.
Remove unused image sizes registered by old themes and plugins, which waste storage and processing time. After changing image sizes, regenerate thumbnails with a plugin such as Regenerate Thumbnails so existing images get the new sizes.
Lazy loading done right
Lazy loading delays images below the visible area until the visitor scrolls near them. WordPress adds native lazy loading to images automatically. This saves bandwidth and speeds up initial loading on category pages with many products.
Do not lazy-load the main product image or the first row of products on category pages, because those are often the Largest Contentful Paint element. WordPress skips lazy loading for the first images in content, but themes and page builders sometimes override this. See lazy loading images for details.
Thumbnails and galleries
Product galleries often load every full-size image upfront, even if the visitor only looks at the first one. Choose a gallery that loads additional images on demand. Make sure gallery thumbnails use small image sizes rather than scaled-down full images.
Zoom features should load the high-resolution image only when the visitor zooms. Check gallery behaviour on mobile, where swipe galleries are common and large images cost the most.
Category and shop pages
Category pages can display dozens of products at once, so image size matters even more. Use a dedicated thumbnail size for product grids, around 400 to 600 pixels wide depending on your layout. Hover image swaps, which show a second image on hover, double the images loaded; use them sparingly.
Limit products per page or use pagination rather than infinite scroll, which keeps loading more images. My guide to speeding up a WooCommerce store covers other category page fixes.
CDN delivery
A CDN serves images from servers near your customers, which helps stores selling across regions. Many optimization plugins include a CDN that also converts formats and resizes images on the fly. Cloudflare and Bunny CDN are common choices.
Image CDNs can resize images automatically based on the visitor’s screen, which simplifies setup. Check pricing based on your traffic and catalogue size. See do you need a CDN.
Alt text and file names
Optimization is not only about speed. Descriptive file names and alt text help accessibility and image search. Use names like navy-linen-shirt-front.jpg rather than IMG_4532.jpg, and alt text that describes the product and its key attributes.
Avoid stuffing keywords into alt text. Describe the image as you would to someone who cannot see it. My guide to image SEO covers this in more detail.
Measure the results
Test key pages in PageSpeed Insights before and after optimization. Look at total page weight, LCP and the image-related suggestions. Check field data in Search Console after a few weeks to confirm improvements for real users.
If you would like your catalogue optimized without losing quality, it is part of my speed optimization service. For product page design, see WooCommerce product page optimization.
Key takeaways
- Resize product photos before upload to a consistent size.
- Compress images and serve WebP or AVIF versions.
- Never lazy-load the main product image or first row of products.
- Use small thumbnail sizes for category grids and galleries.
Frequently asked questions
What size should WooCommerce product images be?
Around 1200 to 2000 pixels on the longest side is enough for most stores, with consistent proportions.
Should I use a CDN for images?
It helps if your customers are spread across regions. Many optimization plugins include one.
Is WebP supported by all browsers?
All modern browsers support WebP. Plugins can serve JPEG fallbacks for older ones.
Will compression make my products look worse?
Not at sensible settings. Test a few images and choose a level where differences are not visible.
Do I need to regenerate thumbnails?
Yes, after changing image sizes or themes, so existing images get the correct sizes.
