DEV Community

Cover image for Before and After: Optimizing Product Images for an Online Store
Rohan Verma
Rohan Verma

Posted on

Before and After: Optimizing Product Images for an Online Store

Product images play a critical role in the success of an online store. Customers rely on visual information to evaluate products, compare alternatives, and make purchasing decisions. However, high-resolution product photographs can create performance problems when they are uploaded without proper optimization.

Large image files may increase page load times, consume mobile data, and make product pages less responsive, particularly on slower internet connections. These problems can frustrate shoppers and potentially reduce engagement and sales opportunities. They can also affect important website performance metrics, including Largest Contentful Paint (LCP).

Image optimization offers a practical way to balance visual quality with technical performance. By reducing unnecessary image data, choosing appropriate formats, and delivering images at suitable dimensions, online retailers can improve the efficiency of their websites without sacrificing the shopping experience.

This case study examines a before-and-after product image optimization workflow for a hypothetical online store. It explains how to evaluate image performance, identify technical improvements, measure potential outcomes, and apply the lessons to e-commerce SEO.

Important disclosure: This is an illustrative case study, not a report of a completed client experiment. No actual store analytics, image compression tests, ranking changes, or conversion results have been provided. The methodology and recommendations below are designed to support a real-world experiment.

Background and Context

The challenge of unoptimized product images

Imagine a small online retailer selling clothing, accessories, and home decor. Its website contains hundreds of product listings, each with several photographs showing different angles, colors, and details.

The original publishing workflow prioritizes image quality and convenience. Photographers export large JPEG or PNG files, and the website administrator uploads them directly to the store.

Although the photographs look attractive, the workflow may introduce several technical problems:

  • Oversized files: Product images contain more data than necessary for their displayed dimensions.
  • Incorrect image dimensions: Large photographs are delivered to small mobile screens.
  • Inefficient formats: JPEG or PNG files are used when a modern format might offer a better size-to-quality balance.
  • Unnecessary metadata: Images contain metadata that may not be needed for website delivery.
  • Poor loading priorities: The primary product image may not load early enough, while images below the fold compete for bandwidth.

These issues can increase page weight and make product pages slower to render.

Why image optimization matters for SEO

Image optimization supports several aspects of website quality.

First, faster-loading pages can improve the browsing experience. Second, appropriately sized images reduce unnecessary data transfer. Third, descriptive filenames, useful alternative text, and relevant surrounding content help search engines understand product imagery.

Google evaluates page experience through several signals, including Core Web Vitals. These metrics include LCP, which measures the time it takes for the largest visible content element to render; Interaction to Next Paint (INP), which measures responsiveness; and Cumulative Layout Shift (CLS), which measures unexpected visual movement.

Image optimization can contribute to better LCP performance when images are the primary rendering bottleneck. However, it does not automatically improve every Core Web Vital or guarantee higher search rankings.

Objectives and Research Questions

The hypothetical store needs a repeatable image optimization process that improves performance while preserving product appearance.

The case study focuses on five objectives:

  1. Reduce product image file sizes without unacceptable visual degradation.
  2. Improve image delivery across desktop and mobile devices.
  3. Identify whether image optimization contributes to better Core Web Vitals.
  4. Establish a measurable before-and-after testing process.
  5. Develop an image publishing workflow that supports long-term e-commerce SEO.

The main research questions are:

  • How much can image file sizes be reduced while maintaining acceptable visual quality?
  • Which image formats and dimensions are appropriate for different product images?
  • Does the optimized workflow improve actual page performance?
  • How should a retailer measure the impact on user behavior and business outcomes?

Methodology: The Before-and-After Optimization Process

Step 1: Establish the baseline

Before making changes, the retailer should select representative pages from its product catalog.

The sample should include product pages with large hero images, image galleries, thumbnails, and multiple product variants. Desktop and mobile versions should both be evaluated.

Record the following baseline measurements:

Metric Purpose
Original image file size Establishes the starting point for compression
Image dimensions Identifies oversized assets
Image format Reveals opportunities for format changes
LCP Measures the loading performance of the main visible content
Total page weight Shows the overall amount of data transferred
Number of image requests Helps identify excessive image loading
Conversion rate Provides business context for later analysis

Tools such as Google PageSpeed Insights, Chrome DevTools, and Google Search Console can support different parts of the evaluation. Google Search Console provides field performance information for eligible URLs, while PageSpeed Insights combines laboratory diagnostics with available real-user data.

The measurements should be collected before optimization, with test conditions documented carefully.

Step 2: Identify oversized product images

The next step is to inspect the existing image library.

For example, a product photograph measuring 3,000 × 3,000 pixels may be displayed in a product card only 400 pixels wide. If the larger image is delivered unnecessarily, the browser may download more data than the layout requires.

However, the solution is not to resize every image to the same small dimension. Product detail pages may require larger images for zooming, high-density displays, or detailed inspection.

The correct approach is to generate appropriately sized image variants and deliver the most suitable version for the user's screen.

Step 3: Compress images while preserving visual quality

Compression reduces the amount of data required to store and transmit an image.

There are two principal approaches:

  • Lossless compression: Reduces file size without discarding image information.
  • Lossy compression: Reduces file size by removing some information, which can produce greater savings but may introduce visible artifacts.

A retailer should test compression settings using representative photographs, particularly images containing fabric textures, fine product details, gradients, and text.

An online image compression workflow can help prepare existing product photographs for publication. For a practical starting point, retailers can use this free online image compressor to explore image file size reduction before uploading optimized assets.

The compressed output should be checked visually at realistic display sizes. The appropriate settings depend on the source image, output format, and acceptable quality threshold.

Step 4: Select appropriate formats and responsive dimensions

Different formats suit different image requirements.

  • JPEG: Commonly used for photographs and product imagery.
  • WebP: Supports lossy and lossless compression and can reduce file sizes compared with some traditional formats.
  • AVIF: Can offer efficient compression, depending on the image and encoding settings.
  • PNG: Useful when lossless quality or transparency is required.

Modern formats should be evaluated for visual quality, browser support, compatibility with the store's platform, and processing costs.

Responsive image delivery is equally important. HTML attributes such as srcset and sizes allow browsers to select an appropriate image variant based on screen characteristics and layout requirements.

For example, a mobile shopper should not automatically receive the same large image file intended for a wide desktop product gallery.

Step 5: Improve image loading behavior

Compression alone does not resolve every image-related performance problem.

The store should also review how images are loaded:

  • Use descriptive filenames that reflect the product.
  • Provide accurate alternative text for meaningful product images.
  • Specify image width and height to reduce layout shifts.
  • Avoid lazy-loading the primary image when it is the LCP element.
  • Use lazy loading for suitable below-the-fold images.
  • Consider responsive preloading or appropriate fetch priority when the main image is discovered too late.
  • Avoid loading unnecessary gallery images before they are needed.

These changes should be implemented carefully and tested against the existing site architecture.

Step 6: Run a controlled comparison

After optimizing the selected images, rerun the same tests under comparable conditions.

Use the same page templates, device settings, network conditions, and testing tools wherever possible. Repeat laboratory tests to reduce the influence of temporary variations.

A comparison should distinguish between image-level improvements and page-level results. A smaller image file does not necessarily produce an equivalent percentage reduction in page load time because scripts, fonts, server response times, and other resources also contribute to performance.

For a stronger experiment, optimize a defined group of comparable product pages while keeping a separate group unchanged. Where practical, compare field performance over a sufficient period and account for traffic, seasonal changes, caching, and other site updates.

Findings and Analysis

Because no actual before-and-after measurements are available, the following are evaluation criteria rather than reported experimental findings.

Image file size reduction

The first result to examine is the change in file size.

The percentage reduction can be calculated using:

File size reduction (%) =

[
\frac{\text{Original size}-\text{Optimized size}}
{\text{Original size}}\times100
]

For illustration, suppose a product photograph decreases from 800 KB to 240 KB after compression.

The reduction would be:

[
\frac{800-240}{800}\times100=70\%
]

This is a hypothetical calculation, not a measured result from a real online store.

The retailer should also verify that the compressed image retains sufficient detail, especially when customers need to inspect stitching, material, color, or product dimensions.

Website performance

Smaller images can reduce transfer sizes and improve loading performance, particularly when images dominate the page's content.

However, the actual LCP improvement depends on factors such as image discovery, server response time, network conditions, caching, image dimensions, and rendering behavior.

The analysis should therefore compare LCP and other relevant performance metrics instead of assuming that compression alone has solved the problem.

SEO and user experience

Optimized product imagery can support a stronger technical foundation for organic search. Descriptive filenames, relevant alt text, image sitemaps where appropriate, and crawlable image URLs can improve image discoverability.

Yet image optimization should be treated as one part of a broader SEO strategy. Product information, internal linking, structured data, useful content, and site architecture remain important.

Similarly, any improvement in conversions must be measured rather than assumed. A controlled experiment is more reliable than attributing a sales increase to image compression immediately after deployment.

Key Lessons from the Case Study

1. Image quality and performance must be balanced

The smallest possible file is not always the best choice. Product photographs must remain clear enough to support informed purchasing decisions.

2. Optimization should happen before publication

A repeatable workflow reduces the likelihood of oversized files entering the production website. Automated checks can flag unusually large assets before they are published.

3. Page-level testing is essential

File size reduction is a useful technical result, but LCP, total page weight, and real-user performance provide a more complete picture of website improvement.

4. SEO requires more than compression

Technical optimization works best alongside relevant product content, accurate image metadata, effective internal linking, and a good mobile experience.

5. Backlink acquisition should remain evidence-based

When publishing a case study on an external website, contextual relevance matters. A link placed naturally within useful educational content can help readers discover a relevant resource and may generate referral visits.

However, a contextual backlink is not proof of an editorial endorsement, and one link cannot guarantee ranking improvements. Publishers should prioritize audience relevance, original analysis, and editorial quality rather than creating content solely to obtain links.

Actionable Recommendations

The hypothetical retailer should prioritize the following improvements.

Priority 1: Audit the largest product images. Identify assets that are disproportionately large compared with their displayed dimensions.

Priority 2: Establish image quality standards. Define acceptable formats, dimensions, compression settings, and visual inspection criteria.

Priority 3: Generate responsive image variants. Deliver suitable image sizes to mobile and desktop users instead of serving oversized assets indiscriminately.

Priority 4: Fix loading and layout issues. Review LCP image priority, below-the-fold lazy loading, image dimensions, and unnecessary image requests.

Priority 5: Measure results consistently. Record baseline and post-implementation metrics, and use a controlled comparison where feasible.

Priority 6: Strengthen image SEO. Use descriptive filenames, meaningful alt text, crawlable image URLs, and relevant product-page context.

Priority 7: Distribute useful findings. Publish the completed case study on a relevant industry blog, share it with appropriate professional communities, and pursue legitimate editorial coverage where the research provides genuine value.

Priority 8: Evaluate backlinks beyond link attributes. Assess the publisher's topical relevance, audience, editorial standards, referral traffic, and link placement. Review rel="sponsored" and rel="ugc" attributes where applicable, and do not assume that every user-generated or Web 2.0 link will pass ranking signals.

Conclusion

Optimizing product images for an online store involves more than reducing file sizes. It requires a coordinated approach to compression, responsive image delivery, loading behavior, accessibility, and performance measurement.

A well-designed before-and-after study should document the original conditions, explain every optimization, and measure the results using comparable methods. It should also distinguish technical improvements from business outcomes and avoid attributing ranking or conversion changes to image optimization without supporting evidence.

For e-commerce businesses, the recommended next step is to audit a representative group of product pages, optimize their images, and compare the resulting file sizes and performance metrics. Once the process demonstrates reliable improvements, it can be incorporated into the store's ongoing publishing workflow.

The broader lesson is straightforward: better image delivery can support a faster, more accessible, and more effective shopping experience, but meaningful conclusions depend on transparent testing and verified data.

Frequently Asked Questions

1. Why is product image optimization important for e-commerce SEO?

It can reduce unnecessary data transfer, support faster page rendering, and improve the user experience. Descriptive filenames and alternative text also help search engines interpret relevant imagery.

2. Which image format is best for an online store?

There is no universal winner. WebP and AVIF are useful modern options for many product photographs, while JPEG and PNG remain appropriate for certain workflows. Test image quality, compatibility, and file size before choosing a format.

3. Does image compression directly improve Google rankings?

Not automatically. Compression may contribute to better page performance, but search rankings depend on multiple factors. Ranking improvements should not be promised without reliable evidence.

4. How can an online store measure image optimization results?

Compare original and optimized file sizes, page weight, LCP, other relevant Core Web Vitals, and real-user performance. Conversion rates and revenue can be monitored separately using suitable analytics and controlled experiments.

5. Should every product image be lazy-loaded?

No. Lazy loading is generally suitable for images below the initial viewport, but the main image responsible for LCP should normally be loaded promptly. Apply loading strategies according to each image's position and role.

Top comments (0)