Boost Web Performance with WebP Conversion

Why This Matters More Than Most Developers Realise

According to HTTP Archive data from 2024, images account for 52% of the median website’s total page weight. Of that, PNG files still represent approximately 18% of all image requests across the web—second only to JPEG in prevalence. Yet here’s the problem most developers overlook: PNG was designed in 1996 as a lossless format for archival and professional work, not for the web’s bandwidth constraints or Core Web Vitals thresholds.

WebP, introduced by Google in 2010 and now supported by 96%+ of browsers globally (including all modern versions of Chrome, Firefox, Edge, and Safari as of version 16+), offers 26–34% better compression than PNG for the same visual quality. For a typical e-commerce site running 500+ product images, that compression difference translates to 1.2–1.8 MB of saved payload per pageload. When multiplied across thousands of daily visitors, that’s the difference between an LCP of 2.1 seconds and 3.8 seconds—a metric that directly correlates with conversion rates.

The critical insight most articles miss: PNG-to-WebP conversion isn’t a one-size-fits-all switch. Transparency handling, colour space preservation, and compression algorithm selection all matter. A carelessly converted WebP file can actually look worse than the original PNG while saving minimal file size. Understanding these technical nuances is what separates a 12% page speed improvement from a 35% improvement.

Actionable Solution 1: Understanding When to Convert PNG to WebP and When to Keep PNG

The Technical Decision Tree: Which PNGs Should Become WebP?

Not every PNG on your site should be converted. Your decision should hinge on three technical criteria:

1. Colour Depth and Transparency Needs

PNG files typically come in two variants: PNG-8 (indexed colour, 256 colours maximum) and PNG-24/32 (truecolor with optional alpha channel). WebP handles all of these, but the conversion quality depends on the original colour profile.

If your PNG is a 24-bit image with a photographic or gradient background (like product photos with soft shadows), WebP will compress it to 60–70% of the original size with imperceptible quality loss. A 512 KB PNG product photo typically converts to 185–210 KB WebP using quality settings between 75–80.

If your PNG is an icon or graphical asset with a limited colour palette and sharp edges (like a logo with a transparent background), WebP still wins—but PNG-8 was already optimised for this use case. A 45 KB PNG icon might only compress to 38 KB WebP. The savings are real but modest. However, if you’re serving that icon across 500 pages, you save 3.5 KB per pageload, which compounds.

If your PNG contains text or line art with crisp edges (like infographics or diagrams), be cautious. WebP’s lossy compression mode can introduce subtle blur around text elements. Use WebP’s lossless mode (which uses the same compression as PNG) or keep the PNG. Lossless WebP files are typically 5–15% smaller than PNG equivalents, which is worth the conversion effort.

2. Browser Support and Fallback Strategy

Modern browsers support WebP widely, but if your analytics show meaningful traffic from older browsers, you must serve PNG as a fallback. This is handled via the <picture> element:

<picture>
  <source srcset="product.webp" type="image/webp">
  <img decoding="async" src="product.png" alt="Blue cotton shirt">
</picture>

This approach costs nothing in terms of page speed (only one image is downloaded) and ensures universal compatibility. If your user base is 98%+ modern browsers, you can serve WebP exclusively.

3. Storage and Operational Cost

If you’re paying for CDN bandwidth or image storage, WebP’s 30% file size reduction directly reduces costs. A site serving 500 KB average PNG files to 50,000 daily visitors consumes 25 GB of bandwidth daily. Converting to WebP reduces that to 17.5 GB—a 7.5 GB daily saving, or 225 GB monthly. At typical CDN rates ($0.085 per GB), that’s $19 monthly saved, or $228 annually. For larger properties, this becomes material.

The Conversion Process: Maintaining Quality While Shrinking File Size

The core conversion workflow involves three steps: choosing a compression algorithm, selecting appropriate quality parameters, and validating the visual output.

Step 1: Selecting the Compression Mode

WebP offers two compression modes:

  • Lossy Mode (default): Applies aggressive compression, discarding imperceptible color data. Best for photographs, gradients, and complex imagery. A 487 KB PNG product photo typically compresses to 180–220 KB at quality setting 75–80.
  • Lossless Mode: Preserves 100% of the original image data while still compressing. Best for graphics, icons, and text-heavy images. A 156 KB PNG icon typically compresses to 125–135 KB.

The quality parameter ranges from 0–100 in lossy mode. Settings 75–85 are the sweet spot for photographic content—you get 35–40% file size reduction while maintaining visual fidelity that’s imperceptible to the human eye under normal viewing conditions.

Step 2: Preserving Transparency and Colour Space

If your PNG has an alpha channel (transparency), WebP preserves it perfectly in both lossy and lossless modes. The transparency channel adds ~2–3 KB to the final file size regardless of image complexity.

Colour space is where mistakes happen. PNG uses sRGB by default. If your original PNG uses a wider colour space (like Adobe RGB for professional photo work), you must explicitly convert to sRGB during the WebP encoding process. Failing to do so can result in colour shifts that make product images appear inaccurate—particularly critical for fashion, cosmetics, or home decor e-commerce.

Oliver K.G — Founder, BizImageConvert

Oliver is the founder of BizImageConvert.com, a free image conversion and optimisation suite for web developers, designers, and e-commerce teams. He writes on Core Web Vitals, image SEO, and web performance strategies for modern websites.