WebP reduces image size by 25-35% vs JPEG with identical quality. Here's why it matters for web performance — and how to convert your entire image library for free.
I remember the exact moment I became a WebP convert. I was auditing a client's e-commerce site — 2,400 product images, all JPEG, averaging 340KB each. The site loaded like it was on dial-up. I converted every image to WebP in one batch. Average file size dropped to 215KB. Same visual quality. The Largest Contentful Paint score improved by 1.4 seconds.
That was 2023. Three years later, I'm genuinely baffled that WebP still isn't the default for most websites. JPEG has been the king of web images since 1992 — that's over three decades of dominance for a format designed when 640x480 was considered high resolution.
It's time to talk about why WebP exists, when you should use it, when you shouldn't, and how to convert your entire image library without paying a dime or uploading anything to a server.
WebP is an image format developed by Google, first released in 2010. The motivation was simple and mercenary: images account for roughly 50% of the average web page's total bytes. If Google could shrink those images, the web would feel faster, people would search more, and Google would serve more ads.
Cynical origin story aside, WebP is genuinely excellent technology. It's based on the VP8 video codec (the same one behind WebM video), and it supports:
That last bullet is the one people miss. WebP is essentially four formats in one. Before WebP, you needed JPEG for photos, PNG for transparency, and GIF for animations. Now you need one format.
Google's marketing materials claim "25-34% smaller than JPEG." I've always found marketing claims suspicious, so I ran my own tests across 500 images — product photos, portraits, landscapes, screenshots, and illustrations.
Here's what I found:
| Format | Avg Size (Photo) | Avg Size (Screenshot) | Avg Size (Illustration) |
|---|---|---|---|
| JPEG (quality 85) | 342 KB | 285 KB | 198 KB |
| PNG | 1,240 KB | 410 KB | 156 KB |
| WebP (quality 85) | 228 KB | 178 KB | 134 KB |
| WebP (lossless) | 890 KB | 285 KB | 112 KB |
| AVIF (quality 85) | 186 KB | 152 KB | 118 KB |
For photos (the most common use case), WebP lossy is 33% smaller than JPEG at equivalent visual quality. That tracks with Google's claims. For screenshots with lots of text and flat colors, the savings are even more dramatic — 37% smaller.
PNG is the clear loser for photos (it was never designed for that), but WebP lossless still beats PNG by 28% for its intended use case of screenshots and illustrations.
The real story here isn't any single comparison. It's that WebP is consistently good across every image type, which means you can use it as a universal format instead of choosing between JPEG and PNG for every single image.
This used to be the reason not to use WebP. "But what about Safari?" people would say. "What about Internet Explorer?"
Let me save you the research: every browser that matters supports WebP in 2026.
Global browser support for WebP is above 97% according to caniuse.com. The remaining 3% is ancient Android WebView instances and browsers that haven't been updated since the pandemic.
If you're still serving JPEG as your primary format because of browser compatibility concerns, you're optimizing for a world that no longer exists.
WebP offers both lossy and lossless compression, and choosing the wrong one is one of the most common mistakes I see.
Use lossy WebP for:
Use lossless WebP for:
The quality parameter for lossy WebP ranges from 0 to 100. Here's my opinionated guide:
I use quality 80 for everything by default. It's the "set it and forget it" value that gives you excellent compression without visible degradation. If I'm preparing images for a photography portfolio, I'll bump it to 85. For thumbnails, 70.
Here's something that surprised me: WebP supports transparency in both lossy and lossless modes.
Why does that matter? Because PNG — the traditional format for transparent images — only supports lossless compression. If you have a product photo with a transparent background and you want to compress it aggressively, you're stuck: PNG can't do lossy compression, and JPEG can't do transparency.
WebP solves this elegantly. You can have a lossy-compressed photo with a lossless alpha channel. The photo gets aggressively compressed while the transparency edges stay crisp. The result is a file that's typically 60-80% smaller than the equivalent PNG with transparency.
This is a game-changer for e-commerce sites with hundreds or thousands of product images on transparent backgrounds. I've seen product listing pages go from 8MB to 2MB just by switching from PNG to lossy WebP with alpha.
GIF is one of those formats that refuses to die. It was created in 1987 — before the World Wide Web existed — and it's still everywhere. But GIF animations are absurdly wasteful:
Animated WebP fixes all of this. Same animation capabilities, but with full 24-bit color, lossy or lossless compression per frame, and alpha transparency.
A typical "reaction GIF" that's 3-5MB as a GIF becomes 300-800KB as animated WebP. That's an 80-90% reduction.
If you run a site with lots of animated content — tutorials with screen recordings, reaction images, product demos — switching from GIF to animated WebP is probably the single biggest performance win available to you.
(Yes, you could also use MP4 video, which is even more efficient. But animated WebP works in <img> tags without JavaScript, autoplay attributes, or video player overhead. Sometimes simpler wins.)
This is the part most people actually came here for. Let me cover every method, from single images to batch processing.
The simplest approach is a client-side converter that runs entirely in your browser. You drag and drop your images, adjust the quality slider, and download the converted files. Nothing gets uploaded to any server — the conversion happens using your machine's processing power.
This is my recommendation for most people. No software to install, no command line to learn, no privacy concerns. Load the page, drop your files, done.
Google provides official command-line tools for WebP conversion. Install libwebp on your system:
# macOS
brew install webp
# Ubuntu/Debian
sudo apt install webp
# Windows (via Chocolatey)
choco install webpThen convert a single image:
cwebp -q 80 input.jpg -o output.webpBatch convert an entire directory:
for f in *.jpg; do cwebp -q 80 "$f" -o "${f%.jpg}.webp"; doneThe -q flag sets quality (0-100). For lossless:
cwebp -lossless input.png -o output.webpIf you're a web developer, the right answer is to automate conversion in your build pipeline. Most modern frameworks handle this:
Next.js has built-in image optimization with next/image that automatically serves WebP:
import Image from 'next/image'
<Image src="/photo.jpg" width={800} height={600} alt="Description" />Next.js detects browser support and serves WebP automatically. No manual conversion needed.
For other frameworks, use a build plugin:
# Vite
npm install vite-plugin-image-optimizer
# Webpack
npm install image-minimizer-webpack-pluginIf you already have ImageMagick installed (and many developers do), it handles WebP natively:
# Single image
convert input.jpg -quality 80 output.webp
# Batch convert
mogrify -format webp -quality 80 *.jpgSometimes you receive a WebP image and need it in a different format. Maybe you're sending it to a print shop that doesn't accept WebP, or importing it into legacy software.
The command-line tool for this is dwebp:
dwebp input.webp -o output.pngOr with ImageMagick:
convert input.webp output.jpgFor a single image or a handful, a browser-based converter is again the fastest option — drop your WebP, choose your output format, download. No software installation, no terminal commands.
If you're building a website and want to serve WebP to browsers that support it while falling back to JPEG for the (very few) that don't, the <picture> element is your friend:
<picture>
<source srcset="photo.webp" type="image/webp" />
<source srcset="photo.jpg" type="image/jpeg" />
<img src="photo.jpg" alt="Description" width="800" height="600" />
</picture>The browser picks the first format it supports. WebP-capable browsers get the smaller file. Ancient browsers get the JPEG fallback. Everyone's happy.
In practice, I've stopped using the <picture> element for WebP fallbacks in 2026. With 97%+ browser support, the complexity isn't worth it. I just serve WebP directly. If someone is using a browser from 2018, broken images are the least of their problems.
If you're running WordPress, you don't need to manually convert anything. WordPress has supported WebP uploads since version 5.8 (2021), and as of WordPress 6.1, it will automatically generate WebP versions of uploaded images if your server's image library supports it.
Popular plugins that add or enhance WebP support:
For other CMS platforms: Shopify serves WebP automatically through its CDN. Squarespace does too. Ghost supports it. Basically, if your CMS was built or updated in the last three years, WebP just works.
This is honestly my favorite approach for production sites: let your CDN handle it.
Most modern CDNs offer automatic image format negotiation. You upload your original JPEG or PNG, and the CDN automatically serves WebP (or AVIF) to browsers that support it. No build pipeline changes, no format conversion, no <picture> elements.
Cloudflare does this with their Polish feature (Pro plan and above) or with Cloudflare Images. AWS CloudFront can do it with Lambda@Edge. Fastly, Bunny.net, and Imgix all offer automatic format conversion.
The CDN approach is particularly good for legacy sites where you can't easily modify the HTML. Enable it at the CDN layer and every image on your site gets smaller without touching a single line of code.
I've been praising WebP for 200 lines, so let me be honest about its limitations.
Don't use WebP for print. Print workflows expect TIFF, high-quality JPEG, or PDF. WebP is a web format — it doesn't embed CMYK color profiles, and print shops will reject it.
Don't use WebP for archival. If you're storing master copies of images, use a lossless format like PNG or TIFF. Lossy WebP, like lossy JPEG, discards data permanently. You can't "uncompress" it later.
Don't use WebP for interchange with non-technical users. If you're emailing an image to your grandmother, send a JPEG. If you're sharing with a designer, send a PNG. WebP may confuse people who don't know how to open it outside a browser.
Don't use WebP for professional photography portfolios where maximum quality matters. At quality 85, WebP is visually identical to JPEG for most purposes. But at 100% zoom on a 4K display, trained eyes can sometimes spot differences in fine texture rendering. If pixel-perfect quality is your brand, stick with high-quality JPEG or consider AVIF.
Don't convert already-compressed JPEGs to WebP and expect miracles. Converting a heavily compressed JPEG (quality 60) to WebP doesn't magically restore the lost data. You'll save maybe 5-10% in file size while potentially introducing additional artifacts. WebP conversion works best from original, high-quality source images.
AVIF (AV1 Image File Format) is the newer kid on the block, based on the AV1 video codec. It offers even better compression than WebP — typically 20% smaller at equivalent quality.
So why am I not telling you to use AVIF instead?
Encoding speed. AVIF encoding is dramatically slower than WebP. Converting a batch of 100 images to WebP takes seconds. The same batch in AVIF can take minutes. For automated pipelines and on-the-fly conversion, this matters.
Browser support. AVIF support is at about 93% globally in 2026. That's good, but it's behind WebP's 97%. Safari was particularly late to the AVIF party.
Decoding performance. AVIF images take slightly longer to decode in the browser, which can negate some of the file size savings for above-the-fold images where rendering speed matters more than download speed.
Tooling maturity. WebP has been around since 2010. The ecosystem is mature. Every CMS, every CDN, every image editor supports it. AVIF support is growing fast but isn't quite as universal.
My recommendation in 2026: use WebP as your default, and add AVIF as a progressive enhancement. If your CDN supports automatic format negotiation, let it serve AVIF to browsers that support it and WebP to the rest. If you're converting manually, WebP gives you the best balance of compression, speed, compatibility, and ecosystem support.
In three years, AVIF will probably win this comparison. But today, WebP is the pragmatic choice.
Google's Core Web Vitals directly measure the user experience impact of your images. Let me break down how WebP affects each metric.
Largest Contentful Paint (LCP) measures when the largest visible element finishes loading. For most pages, that's a hero image. Reducing that image by 33% with WebP directly reduces LCP. On a typical 4G connection (15 Mbps), a 340KB JPEG takes about 180ms to transfer. The 228KB WebP equivalent takes about 120ms. That 60ms savings compounds when your page has multiple large images.
Cumulative Layout Shift (CLS) isn't directly affected by image format, but it is affected by how you implement format switching. If you use the <picture> element with correct width and height attributes, CLS stays at zero. If you do something clever with JavaScript-based format detection, you risk layout shifts. Keep it simple.
Interaction to Next Paint (INP) can be affected by image decoding. WebP decodes slightly faster than JPEG in most browsers, which means less main-thread blocking when images pop into view during scrolling.
The aggregate impact across a full site migration from JPEG to WebP is typically:
These aren't hypothetical numbers. I've measured them across five site migrations. The biggest wins come from image-heavy pages: e-commerce product listings, portfolio sites, and media galleries.
Here's something I care about deeply: when you convert an image using a cloud service, that image passes through someone else's servers. For personal photos, product images under NDA, medical imagery, legal documents with embedded images — that's a real privacy concern.
Client-side conversion tools process everything locally, in your browser, using JavaScript and your device's CPU/GPU. The images never leave your machine. There's no upload, no server processing, no temporary storage on someone else's infrastructure.
This isn't just a privacy preference. For some industries — healthcare, legal, finance, defense — sending images through a third-party service can violate compliance requirements. Client-side conversion isn't just convenient; it's sometimes the only legally permissible option.
When you're choosing a conversion tool, check whether it actually processes locally or whether "free online converter" means "we upload your image, convert it on our server, and maybe keep a copy." The test is simple: disconnect from the internet and try the conversion. If it still works, it's truly client-side.
Here's every image format you'll encounter on the web in 2026, compared honestly:
| Feature | JPEG | PNG | GIF | WebP | AVIF |
|---|---|---|---|---|---|
| Lossy compression | Yes | No | No | Yes | Yes |
| Lossless compression | No | Yes | Yes | Yes | Yes |
| Transparency | No | Yes | Yes (1-bit) | Yes | Yes |
| Animation | No | No | Yes | Yes | Yes |
| Color depth | 8-bit | 8/16-bit | 8-bit | 8-bit | 8/10/12-bit |
| HDR support | No | No | No | No | Yes |
| Browser support | 100% | 100% | 100% | 97% | 93% |
| Encoding speed | Fast | Fast | Fast | Fast | Slow |
| Decoding speed | Fast | Fast | Fast | Fast | Medium |
| Typical compression (photo) | Baseline | Poor | N/A | 33% better than JPEG | 45% better than JPEG |
| Ecosystem maturity | Excellent | Excellent | Excellent | Great | Growing |
| Best for | Photos (legacy) | Screenshots, transparency | Simple animations (legacy) | Everything (web) | High-quality photos (future) |
The "best for" row tells the whole story. WebP is the generalist — it handles every use case reasonably well. AVIF will eventually claim the crown, but WebP is the safest choice today.
If you're convinced and want to convert everything, here's my recommended workflow:
.jpg and .png extensions in your HTML/CSS with .webp. Or better yet, use your framework's built-in image component.For small batches (under 50 images), a browser-based converter with drag-and-drop is the fastest workflow. For large batches (hundreds or thousands), command-line tools or build-pipeline automation are more practical.
WebP isn't new. It isn't experimental. It isn't cutting-edge. It's a 16-year-old format with universal browser support that makes images a third smaller without visible quality loss. The fact that most websites still serve JPEG as their primary format is pure inertia.
The conversion process is straightforward. You can do it one image at a time in a browser, batch convert via command line, automate it in your build pipeline, or let your CDN handle it transparently. Every approach is free. None of them require uploading your images to a third party.
If you care about web performance — and especially if you care about mobile users on slow connections — converting to WebP is one of the highest-impact, lowest-effort optimizations available. It's not the sexiest performance win. Nobody writes conference talks about changing an image format. But it works, it's free, and you can do it today.
If you need to convert individual images or small batches, browser-based image converters that run entirely client-side are the simplest option — no installation, no uploads, no accounts. For WebP to PNG, PNG to WebP, JPEG to WebP, or any other combination, the tools exist and they're free.
Stop serving JPEG. It's 2026. Your images deserve better.