Three formats dominate image delivery on the web: PNG, JPG, and WebP. Each uses fundamentally different compression strategies, and choosing wrong means either wasting bandwidth or degrading quality unnecessarily.
This guide compares all three with real file size data, not vague claims. A 4000x3000 photograph weighs roughly 36MB uncompressed. As a PNG, that's about 25MB. As a JPG at 85% quality, it drops to 2.8MB. As a WebP at equivalent visual quality, it's around 2.1MB. Those differences compound across every page load, every user, every day.
The right choice depends on exactly three things: what's in the image, where it's going, and whether you need transparency. Here's how to decide.
How Each Format Compresses Images
Understanding why these formats produce different file sizes requires knowing what each one actually does to your pixel data.
PNG: Lossless Deflate Compression
PNG uses the DEFLATE algorithm (same as gzip) to compress pixel data without losing any information. Every single pixel in the output is identical to the input. The encoder scans each row, applies one of five predictive filters (None, Sub, Up, Average, Paeth) to reduce redundancy, then DEFLATE compresses the filtered data.
This makes PNG excellent for images with large areas of identical color — a screenshot with flat UI elements might compress to 10% of its raw size. But photographs with continuous tonal variation resist this approach. A 12-megapixel photo rarely gets below 15MB as a PNG because natural images have too much per-pixel variation for DEFLATE to exploit.
PNG also supports indexed color (palette mode): if your image uses 256 colors or fewer, PNG stores a color table and references it per-pixel, dramatically reducing size. A simple chart or diagram with 20 colors might be just 15KB as an indexed PNG.
JPG: DCT Lossy Compression
JPG divides the image into 8x8 pixel blocks, converts each from RGB to YCbCr color space (separating luminance from chrominance), then applies a Discrete Cosine Transform. The DCT converts spatial pixel data into frequency components. The encoder then quantizes these frequencies — rounding high-frequency detail to zero. This is where data is permanently lost.
The quality slider (0-100) controls how aggressively quantization discards frequency data. At quality 100, almost nothing is discarded — the file is 5-10x larger than quality 85. At quality 85, roughly 70% of high-frequency data is gone, but human eyes can't detect the difference in photographs. Below quality 60, you'll start seeing blocky artifacts around sharp edges and text.
JPG does not support transparency. It's strictly 24-bit RGB (16.7 million colors). The 8x8 block structure means JPG handles gradual tonal changes in photos well, but sharp edges — like text on a background — produce visible ringing artifacts called Gibbs phenomenon.
WebP: VP8 Lossy + VP8L Lossless
WebP has two entirely separate compression modes. Lossy WebP uses the VP8 video codec's intraframe compression: it divides the image into variable-size blocks (4x4 to 16x16, unlike JPG's fixed 8x8), predicts each block from its neighbors, and encodes only the residual difference. This adaptive block sizing gives WebP a 25-35% file size advantage over JPG at equivalent visual quality.
Lossless WebP (VP8L) uses a completely different approach: spatial prediction, color-space transforms, backward reference coding, and an entropy coder based on Huffman coding. Lossless WebP produces files 25-30% smaller than PNG for photographic content, though the gap narrows for already-simple images.
WebP also supports 8-bit alpha transparency in both lossy and lossless modes. This is a major advantage over JPG — you can have a photograph with transparency at a fraction of PNG's file size. Lossy WebP with alpha typically produces files 3-5x smaller than the equivalent 32-bit PNG.
Real File Size Comparisons
Abstract percentages are useless without concrete numbers. Here are actual file sizes for three representative images:
| Image Type | Dimensions | PNG | JPG (85%) | WebP (equiv.) |
|---|---|---|---|---|
| Photograph (landscape) | 4000x3000 | 24.8 MB | 2.8 MB | 2.1 MB |
| Screenshot (UI mockup) | 1920x1080 | 385 KB | 312 KB | 178 KB |
| Logo with transparency | 800x400 | 42 KB | N/A (no alpha) | 28 KB |
| Chart/diagram | 1200x800 | 58 KB (indexed) | 94 KB | 39 KB |
| Product photo (e-commerce) | 2000x2000 | 11.2 MB | 1.4 MB | 980 KB |
Key takeaways from these numbers: JPG's lossy compression demolishes PNG for photographs (89% smaller). WebP consistently beats JPG by 25-30%. But for simple graphics with flat colors, indexed PNG is competitive with WebP and far smaller than JPG. JPG actually increases file size for simple graphics because its DCT compression is designed for continuous tones, not hard edges.
When to Use Each Format
Use PNG When...
- You need lossless quality — Screenshots, technical diagrams, text-heavy images where any compression artifact is unacceptable
- You need transparency in legacy contexts — Email clients, older CMS platforms, and some social media still can't render WebP. PNG is the safe choice for transparent images in these contexts
- The image has few colors — Indexed PNG (256 colors max) is extremely efficient for logos, icons, and simple illustrations. A 16-color indexed PNG of a chart can be under 10KB
- You're archiving original artwork — PNG is lossless, meaning you can convert from PNG to any other format later without generational quality loss
Don't use PNG for photographs unless you specifically need lossless archival. A 12MP photo as PNG is 15-25MB; as JPG it's 2-4MB with no visible difference. That's wasted bandwidth for zero benefit.
Use JPG When...
- You need universal compatibility — Every device, browser, app, email client, printer, and operating system supports JPG. Full stop. It's the default for photo sharing
- You're working with photos for print — Print shops expect JPG or TIFF. WebP confuses them
- You need to send images by email — Most email clients handle JPG perfectly. WebP support in email is still spotty (Outlook and older Apple Mail versions may not render it)
- Social media uploads — While platforms accept WebP, they re-encode everything anyway. Upload JPG at 92% quality — it's the sweet spot between size and fidelity before the platform's own re-compression
JPG at 85-92% quality is visually indistinguishable from lossless for photographs. Don't feel guilty about "losing quality" — you're discarding frequency data your eyes literally cannot perceive.
Use WebP When...
- You're delivering images on the web — Browser support is at 97%+ globally (all modern versions of Chrome, Firefox, Safari, Edge, Opera). The 3% who can't see WebP are on IE11 or extremely old Safari. Use
<picture>with a JPG fallback if you care about that 3% - You need transparency AND small files — Lossy WebP with alpha is a game-changer. Product images on transparent backgrounds that would be 500KB as PNG are 80KB as lossy WebP
- Page speed matters — WebP's 25-35% size advantage over JPG directly improves Largest Contentful Paint (LCP). On a page with 10 product images, switching from JPG to WebP can cut image payload by 300-500KB
- You're building a CDN pipeline — Most CDNs (Cloudflare, AWS CloudFront, Fastly) can auto-convert to WebP based on the Accept header. Set up once, serve WebP to supported browsers and JPG to everyone else
The exceptions: Don't serve WebP in HTML emails, embedded in PDFs, or to systems where you can't control the rendering environment. Don't use WebP for images you plan to edit repeatedly — re-encoding lossy WebP accumulates quality loss just like JPG. Convert your PNG to WebP here or convert JPG to WebP.
Transparency, Color Depth, and Animation
| Feature | PNG | JPG | WebP |
|---|---|---|---|
| Transparency | 8-bit alpha (256 levels) | None | 8-bit alpha (256 levels) |
| Max color depth | 48-bit (16 per channel) | 24-bit (8 per channel) | 24-bit + 8-bit alpha |
| Max colors | 281 trillion (48-bit) | 16.7 million | 16.7 million |
| Animation | APNG (limited support) | None | Animated WebP |
| Color profiles | ICC profiles supported | ICC profiles supported | ICC profiles supported |
| HDR support | Via 16-bit channels | No | No (use AVIF) |
On transparency: Both PNG and WebP support full 8-bit alpha, meaning 256 levels of transparency per pixel. For transparent product images, UI elements, or logos, WebP gives you the same alpha quality at a much smaller file size. If your workflow requires transparency but the destination doesn't support WebP, PNG is your only option among these three.
On color depth: PNG's 48-bit color is overkill for web delivery but matters for professional photography workflows. If you're archiving images for later editing, PNG preserves 16-bit-per-channel precision. JPG and WebP are both limited to 8-bit per channel. For HDR imagery, consider AVIF, which supports 10 and 12-bit color.
On animation: APNG is PNG's animated variant, supported in all modern browsers but with limited creation tools. Animated WebP works similarly but produces smaller files. Neither matches GIF's ubiquity for inline animations, though both are technically superior. For anything beyond a simple loop, convert to MP4 instead — video codecs handle motion far more efficiently.
Browser and Platform Support in 2026
WebP's support story has changed dramatically. In 2020, Safari didn't support it. Now, every major browser renders WebP natively.
| Environment | PNG | JPG | WebP |
|---|---|---|---|
| Chrome / Edge / Opera | Full | Full | Full (since 2014) |
| Firefox | Full | Full | Full (since FF65, 2019) |
| Safari / iOS | Full | Full | Full (since Safari 14, 2020) |
| Email clients | Full | Full | Partial (Gmail yes, Outlook no) |
| WordPress / CMS | Full | Full | Most modern CMS support it |
| Social media | Full | Full | Upload yes, re-encoded on ingest |
| Photoshop | Full | Full | Since Photoshop 23.2 (2022) |
| Microsoft Office | Full | Full | Limited (some versions) |
The practical gap is in non-browser contexts. Email clients are the biggest WebP holdout — Outlook for Windows still doesn't reliably render WebP images in 2026. If you embed a WebP in an HTML email, roughly 20-30% of business email users won't see it. For email, use JPG (photos) or PNG (graphics with transparency).
Some content management systems also lag behind. If you're uploading images to a CMS you don't control, test WebP support first. WordPress, Shopify, and Squarespace all handle WebP natively. Older custom CMS platforms may not.
SEO and Performance Impact
Google's Core Web Vitals directly measure how fast your images load. Largest Contentful Paint (LCP) is the metric most affected by image format choice. Google recommends an LCP under 2.5 seconds, and oversized images are the #1 reason pages miss that threshold.
Switching from JPG to WebP across a site typically improves LCP by 100-400ms depending on image density and connection speed. On mobile networks (typical 4G: ~10 Mbps), saving 500KB of image payload translates to roughly 400ms faster load.
Google's image search also benefits from WebP. Googlebot can index WebP images normally, and pages with faster LCP tend to rank higher. There's no direct ranking boost for using WebP specifically, but the performance improvement it enables is a real signal.
The practical SEO approach: Serve WebP with JPG fallback using the <picture> element or CDN auto-negotiation. This gives you the performance benefit for 97%+ of visitors while ensuring the remaining ~3% still see something. Don't serve only WebP with no fallback unless you've confirmed your audience is 100% modern browsers.
The Decision Framework
Walk through these questions in order:
- Does the image need transparency?
Yes → Use WebP if the destination supports it, otherwise PNG. Never JPG. - Is this a photograph or continuous-tone image?
Yes → Use WebP for web delivery. Use JPG for email, print, or legacy systems. - Is this a screenshot, diagram, or graphic with text?
Yes → Use PNG (indexed if possible). For web delivery, WebP lossless also works. - Will this be embedded in email?
Yes → Use JPG for photos, PNG for graphics. Never WebP in email. - Will this be edited further?
Yes → Keep as PNG (lossless). Convert to JPG or WebP only for final delivery. - Is this for web delivery with performance requirements?
Yes → WebP. Always WebP. The 25-35% savings over JPG is free performance.
When in doubt: WebP for the web, JPG for everything else, PNG when you need lossless or transparency in legacy contexts.
The format wars are effectively over for web delivery. WebP wins on file size, supports transparency, and has near-universal browser support. Use it as your default for any image served on the web.
JPG remains the standard for everything outside the browser — email attachments, print files, social media uploads, and any context where you can't guarantee the recipient's software. PNG holds its ground for lossless archival, transparency in legacy systems, and simple graphics where indexed color makes it competitive on size.
Need to convert between these formats? Convert PNG to WebP, convert JPG to WebP, or convert WebP to JPG — all free, all in your browser.