Key takeaways
- WebP is typically 25-35% smaller than PNG for photographic images; PNG can actually win on flat-colour graphics and tiny UI assets.
- WebP supports both lossy and lossless modes and keeps full alpha transparency in lossless mode; PNG is lossless only.
- Browser support for WebP is effectively universal now, so it is safe to serve on any mainstream site.
- Choose PNG when an image will be re-edited, when maximum tool compatibility matters, or when every pixel must survive the round-trip.
- The best production workflow: master in PNG, deliver as WebP, and keep a PNG fallback with the <picture> element for the rarest browsers.
What is WebP?
WebP is an image format developed by Google, first released in 2010. It uses modern compression algorithms derived from the VP8 video codec — the same family that powers the VP8/WebM video formats. WebP supports both lossy compression (like JPEG) and lossless compression (like PNG), plus transparency (an alpha channel, like PNG) and even simple animation.
The headline claim is file size: a WebP image is typically 25-35% smaller than an equivalent-quality JPEG, or 26% smaller than a PNG in lossless mode. On a website loading hundreds of images, that percentage translates to megabytes of bandwidth saved and seconds of load time recovered.
WebP is now supported in every major browser — Chrome, Edge, Firefox, Safari (since version 14 on macOS Big Sur), and Samsung Internet. The old objection that "Safari doesn't support WebP" has not been true since 2020.
What is PNG?
PNG (Portable Network Graphics) was created in 1996 as a patent-free replacement for GIF. It uses lossless compression based on the DEFLATE algorithm, meaning every pixel in the saved file is identical to the original — no quality is lost no matter how many times the file is opened and re-saved.
PNG supports an 8-bit alpha channel, allowing smooth transparency and anti-aliased edges — the feature that made it indispensable for logos, icons, UI mockups, and any image that needs to sit on a variable background.
Because PNG is lossless, it preserves exact pixel values. This matters in technical contexts: medical imaging, screenshot comparison, pixel art, and any scenario where a single changed pixel is a meaningful error.
The downside is file size. A photographic PNG can easily be 5-10× larger than the JPEG equivalent, because lossless compression does not throw information away. For a 4000×3000 landscape photo, expect a 15 MB PNG versus a 2 MB JPEG at quality 85.
File Size Comparison
The size difference between WebP and PNG depends heavily on image content:
For photographic images (landscapes, portraits, product shots): a lossy WebP at quality 80 is typically 70-80% smaller than the equivalent PNG. A 2 MB PNG might become a 400 KB WebP with visually identical quality. This is the scenario where WebP wins decisively.
For flat-colour graphics (logos, icons, UI elements): PNG's DEFLATE algorithm is already very efficient — a 12 KB PNG logo might only shrink to 10 KB as a lossless WebP. The difference is marginal, and the WebP encoding/decoding cost is slightly higher on very simple images.
For screenshots with mixed content (text + UI + screenshots of photos): WebP handles this hybrid case noticeably better, often 30-40% smaller than PNG, because the lossy mode can compress the photographic regions while lossless mode handles text sharpness.
For pixel art and images with very few unique colours: PNG is usually equal or slightly better because its palette optimisation is mature and WebP's spatial prediction adds overhead with no benefit on blocky patterns.
Image Quality: Lossy vs Lossless Modes
WebP operates in two modes. In lossy mode, it discards imperceptible detail using a quantisation table similar to JPEG but with better chroma subsampling handling. In lossless mode, it uses a combination of spatial prediction and entropy coding — conceptually similar to PNG but with more modern prediction filters.
PNG only operates in one mode: lossless. What you put in is exactly what comes out, always.
The practical difference: if you need the saved file to be pixel-identical to the source (screenshots for bug reports, archival, scientific data), PNG is correct. If you need the smallest file that looks the same to a human eye (web images, marketing materials, blog posts), WebP's lossy mode wins.
At matched visual quality, WebP is smaller. At matched file size, WebP looks better. These two statements are the entire argument for WebP in web performance contexts.
Transparency and Alpha Channel
Both formats support transparency, but they handle it differently. PNG has a native 8-bit alpha channel — every pixel can have its own opacity value from 0 (fully transparent) to 255 (fully opaque). This is built into the format's fundamental structure.
WebP in lossy mode does not support transparency at all. Only WebP in lossless mode carries an alpha channel. This means a transparent WebP is always the larger lossless variant — a fact many users do not realise.
Practical consequence: if you need a transparent logo at the smallest file size, a lossless WebP is usually 20-30% smaller than the equivalent PNG. But if you need a photographic image with a transparent background at small file size, neither format does it well — you need a tool that can flatten the transparent area to white and then compress lossily, or you need to accept the larger lossless file.
GIF supports only binary transparency (a pixel is either fully transparent or fully opaque, no anti-aliasing). PNG and WebP both support full alpha, which is essential for smooth edges on icons and text overlays.
Browser and Software Support
WebP: supported natively in Chrome (since v17), Edge (all versions), Firefox (since v65), Safari (since v14 / macOS Big Sur), Opera, Samsung Internet, and all Android browsers. iOS 14+ and macOS Big Sur+ also support WebP in the Photos app and Quick Look. Older iOS 12/13 cannot open .webp files natively.
PNG: universal. Every browser ever made that can display an image supports PNG. Every image viewer, every operating system, every photo application on every device.
The gap has narrowed enormously since 2020. The remaining edge case where PNG is safer: email clients (Outlook on Windows still struggles with WebP in emails), and older corporate environments running Windows 7 with IE11.
For websites, you can use the HTML <picture> element to serve WebP with a PNG/JPEG fallback: <source type="image/webp" srcset="..."> with an <img> fallback inside. This ensures every visitor gets the best format their browser can handle.
When to Use WebP
Use WebP when file size matters more than universal compatibility:
- Website images where page speed affects user experience or SEO rankings.
- Product photos, hero images, blog illustrations — any content on a variable background where photographic compression makes sense.
- Email header images served from a web URL rather than embedded as data URI.
- Mobile apps where download size directly costs users data or storage.
- CDN-hosted images served to a known-modern audience (all traffic from Chrome, Safari 14+, etc.).
- Any scenario where Core Web Vitals — specifically LCP (Largest Contentful Paint) — needs the hero image to be as small as possible.
When to Use PNG
Use PNG when you need lossless accuracy or maximum compatibility:
- Logos and icons that will be re-edited in design software — lossless round-tripping without generation loss.
- Screenshots used in technical documentation, bug reports, or UI comparisons where pixel accuracy matters.
- Print-ready graphics — print workflows expect PNG or TIFF, not WebP.
- Images embedded in documents, presentations, or emails where you cannot control the viewer's software.
- Transparent images that need to work in email clients (Outlook still has issues with WebP transparency).
- Pixel art, game assets, or any image with large areas of flat colour where PNG's palette optimisation is already near-optimal.
- Any file that will be opened on unknown hardware — kiosks, old computers, industrial systems.
Converting Between WebP and PNG
Conversion between the two formats is lossless only in one direction: PNG → WebP (lossless) → PNG recovers the original pixels perfectly. WebP (lossy) → PNG → WebP (lossy) compounds quality loss with each generation, just like repeated JPEG re-saving.
If you are converting from WebP to PNG because a client or platform requires PNG, use a converter that preserves the alpha channel. Not all tools do — some flatten transparency to white silently.
If you are converting from PNG to WebP to reduce file size, use quality 80-85 for photographic content. Below 70, compression artefacts become visible. Above 90, the size saving over the original PNG shrinks to the point of not being worth the quality loss.
Batch conversion of dozens of images saves enormous time compared to doing them one at a time — especially when migrating a website from PNG assets to WebP.
The Verdict
For websites and digital-first content: WebP is almost always the better choice for images that contain photographic content or complex gradients. The file-size savings directly improve page speed, which Google uses as a ranking factor.
For design workflows, print, and compatibility-sensitive contexts: PNG remains the safe, lossless choice.
The two formats are not competitors — they serve different niches. A well-optimised site uses WebP for content images and PNG for logos, icons, and UI elements that need transparency with guaranteed alpha rendering.
AVIF is the newest entrant (see our AVIF vs WebP vs JPG guide), offering 15-20% better compression than WebP at equivalent quality. But browser support, while growing, still lags behind WebP by a year or two. For now, WebP + PNG covers 99% of use cases optimally.
Frequently asked questions
The questions people ask most about webp vs png: which format should you use?, answered directly.