Similarly, 'compressing WebP' means completely different things to different people:
Some want to convert a bunch of JPG/PNG to WebP; some have existing WebP and want to compress it further; others need to handle animated WebP.
There is no absolute best or worst tool, only the one that fits. This article recommends tools by scenario, giving the most handy one or two for each.
Before You Start: A Two-Minute Overview of WebP
WebP actually has three forms:
- Lossy WebP: Similar to JPEG, it discards details based on quality parameters, resulting in smaller file sizes, suitable for photos and banners.
- Lossless WebP: Similar to PNG, pixel data remains completely unchanged, suitable for screenshots and UI assets.
- Animated WebP: Multi-frame animation, can be lossy or lossless, commonly found in memes and demo GIFs converted from GIF.
If you are unsure which type you have, use Google's official webpinfo:
bash
brew install webp
webpinfo image.webp
The output indicates VP8 is lossy, VP8L is lossless, and if it contains ANIM/ANMF, it is an animation.
One thing worth knowing beforehand: re-encoding a lossy WebP with a higher quality parameter will actually increase the file size, not improve the image quality—the discarded details cannot be recovered. Therefore, for existing WebP images, a good compression tool should be able to determine when compression is not possible and skip it.
Scenario 1: Batch Convert JPG/PNG to WebP
This is what most people do when they first encounter WebP.
For a GUI, choose XnConvert. It is free and cross-platform, allowing you to drag a batch of images in at once, set WebP quality or lossless mode, and adjust size and filename simultaneously. It is the most hassle-free way to convert formats.
For build pipelines, choose cwebp or sharp. In a website project, instead of manual conversion, it is better to handle it automatically during build or CDN upload:
bash
cwebp: quality 75, slowest and most efficient encoding method, preserves color profiles
cwebp -q 75 -m 6 -metadata icc input.jpg -o output.webp
js
// sharp (Node.js)
await sharp('input.jpg').webp({ quality: 75, effort: 6 }).toFile('output.webp')
Not sure about the parameters? Try Squoosh first. Google's online tool processes one image at a time, but allows side-by-side comparison and real-time dragging to see effects. Figure out the appropriate quality for a specific type of image, then plug those parameters into the batch tools above.
Scenario 2: Already WebP, Want to Compress It Smaller
Your website has switched to WebP, but Lighthouse still suggests 'images can be further compressed'; or your assets directory is full of WebP taking up space. At this point, you don't need to convert formats, but rather compress existing files in place.
Mac Users: ImgZilla
ImgZilla is our macOS image compression tool, specifically designed for this scenario:
- In-place compression, path unchanged.
banner.webpremainsbanner.webpafter compression, requiring no changes to references in code or documentation. - Drag in an entire folder. Recursively scans all subdirectories, automatically skipping hidden files and
node_modules; can process WebP mixed with JPG, PNG, GIF, AVIF, HEIC, and SVG in one go. - No parameters to adjust. Uses Google's libwebp encoder with quality 75 and effort 4, matching Squoosh's defaults; preserves transparency channels at maximum quality without halo effects.
- Does not force compression. If re-encoding does not reduce the size (compression rate < 0.4%), it is marked as 'minimized' and the original file is kept; it won't give you a larger file and does not deduct free quota.
- You can undo it. The original image is moved to the Trash by default. If you are not satisfied with a specific result, right-click 'Put Back' to restore it.
- Runs entirely locally. Assets are not uploaded to any server.
👉 Download ImgZilla from the Mac App Store
Other Platforms: Caesium or TinyPNG
- Caesium Image Compressor: Open source and free, available on Windows, macOS, and Linux. Supports batch WebP compression with settings for quality and metadata preservation.
- TinyPNG: Web-based tool, also supports WebP. Just drag and drop, but the free version has limits on the number and size of images; images are uploaded to their servers.
Scenario 3: Animated WebP
Animated images have two distinct needs:
Convert GIF to Animated WebP: Use Google's official gif2webp (included in the libwebp toolkit; on Mac, brew install webp). For the same animation, animated WebP is typically much smaller than GIF.
bash
gif2webp -q 75 -m 6 input.gif -o output.webp
Compress an existing Animated WebP: Many tools will throw an error or only keep the first frame when encountering animations. ImgZilla supports re-compression of animated WebP—re-encoding frame by frame, keeping frame count, duration, loop count, and canvas size unchanged. The animation remains the same, just the file is smaller. Like static images, if it cannot be compressed further, it is marked as 'minimized' and the original file is kept.
Scenario 4: Must Be Pixel-Perfect
UI slices must strictly match design files, screenshots require pixel-level comparison, or assets need further editing later—these scenarios require lossless compression.
Using cwebp:
bash
Pure lossless
cwebp -lossless -z 9 input.png -o output.webp
Near lossless: slight pixel variations, much smaller than pure lossless, suitable for screenshots and UI
cwebp -near_lossless 60 input.png -o output.webp
Note: ImgZilla uses lossy encoding for all WebP, including those originally lossless. The file size usually decreases significantly, but pixels will no longer be identical. It also removes metadata (including color profiles) from WebP. For standard sRGB images, this has no effect; images with wide color gamuts like Display P3 may show slight color differences in color management software. For images with strict requirements on pixels and color, please use cwebp or isolate them before compression.
Summary Table
| What You Need to Do | Recommendation | Alternative |
|---|---|---|
| Batch Convert JPG/PNG to WebP | XnConvert | cwebp, sharp (build pipeline) |
| Test parameters, single image | Squoosh | — |
| Compress existing WebP in place (Mac) | ImgZilla | Caesium |
| Compress existing WebP (Windows / Linux) | Caesium | TinyPNG |
| Convert GIF to Animated WebP | gif2webp | — |
| Compress existing Animated WebP | ImgZilla | Write a script using libwebp yourself |
| Must be pixel-perfect | cwebp -lossless / -near_lossless |
— |
Download Links
| Tool | Platform | Price | Download |
|---|---|---|---|
| ImgZilla | macOS 12.3+ | Free (10/day) | Mac App Store |
| XnConvert | Windows / macOS / Linux | Personal Free | xnview.com |
| Caesium Image Compressor | Windows / macOS / Linux | Free & Open Source | saerasoft.com |
| cwebp / gif2webp / webpinfo | Command Line | Free & Open Source | Google Official Download, Mac: brew install webp |
| sharp | Node.js | Free & Open Source | sharp.pixelplumbing.com, npm install sharp |
| Squoosh | Web | Free | squoosh.app |
| TinyPNG | Web | Free with limits | tinypng.com |
Finally
WebP is already a highly efficient format. If your WebP is generated by CDNs or build tools using reasonable parameters, there may not be much room for further compression, and seeing 'minimized' is normal. The real savings often come from files exported with high-quality parameters, converted from lossless PNG, or directly from GIF without further processing.
First, use webpinfo to clearly identify what you have, then choose a tool based on your scenario. It saves much more time than testing between ten different tools.
ImgZilla currently only supports macOS (12.3 and above) and is available for download on the Mac App Store. The free version allows compressing 10 images per day, counting only towards the quota if compression is successful—drag a folder full of WebP into it and see how much you save.
