A speed-test tool tells you to "serve images in next-gen formats" and suggests WebP. So you convert a few dozen JPGs and PNGs, and some come out less than half the size, some come out larger, one transparent logo has grey fringes, and an animation has turned into a still. WebP is not a magic "convert and it shrinks" switch. It has a sweet spot and a few traps you should know. This article covers them and gives a complete browser-local batch workflow.
What WebP is, and who it suits
WebP is an image format from Google that supports lossy compression, lossless compression, an alpha transparency channel and animation. The lossy mode builds on video coding technology and suits photographs; the lossless mode suits screenshots, line art and anything that must be pixel-exact. Compared with JPG, its key advantage is that lossy compression can carry transparency; compared with PNG, its lossless mode and its lossy-plus-alpha mode are more compact for many images. "More compact" depends on content and quality settings, and not every image shrinks. Today all major current browsers can display WebP; compatibility trouble comes mainly from old image software, some OS previews, email clients and some content management systems.
| Format | Compression | Transparency | Animation | Best for |
|---|---|---|---|---|
| JPG | Lossy | No | No | Photos, best compatibility |
| PNG | Lossless | Yes | No (APNG aside) | Screenshots, icons, graphics that must be lossless |
| GIF | Lossless, 256 colours max | 1-bit | Yes | Simple animations, usually large |
| WebP | Lossy or lossless | Yes, and with lossy | Yes | General-purpose web images |
| AVIF | Lossy or lossless | Yes | Yes | Often higher compression, but slower to encode and less supported in old software |
Converting locally with ToolGarden: the steps
- Open Image to WebP and drop images in or click to choose; several at once is fine. Inputs include JPG, PNG, GIF, BMP, SVG, AVIF and anything else your browser can decode.
- Look at the Output quality slider. It defaults to 90 percent. For photographs, start between 80 and 90; for screenshots and text-heavy images, go higher.
- Wait for each image to show as done; the page shows the output size and time for each. Open the preview to compare source and output.
- Inspect the details: banding in gradients, stray colour around text and edges, grey halos on transparent edges. If unhappy, raise the quality and convert again.
- Download one by one, or use the batch ZIP. The limit is 50 MB and about 40 million pixels per file; beyond that you will see a message.
Choosing a quality value
The quality slider controls how hard lossy compression works: higher keeps more detail and makes a bigger file; lower makes it smaller but introduces blur, banding and blockiness. No single best value suits every image because different content tolerates compression very differently. The table gives starting points based on experience; your own eyes make the final call.
| Image type | Starting point | What to inspect |
|---|---|---|
| Landscape and portrait photos | 75 to 85 percent | Banding in sky gradients, over-smoothed skin |
| Product and e-commerce hero images | 85 to 90 percent | Edges, material texture and brand colour accuracy |
| Screenshots and text-heavy images | 90 percent and above | Colour noise around text, small text legibility |
| Icons and cut-outs with transparency | 85 to 95 percent | Grey or ragged transparent edges |
| Blurry-background thumbnails | 60 to 75 percent | Usually forgiving, so you can be more aggressive |
A dependable routine: take three to five representative images (a complex photo, a screenshot with text, one with transparency), try 90, 80 and 70 on each, note the file sizes, compare at real display size, choose the lowest setting you accept, and use it for the batch. Do not zoom to 400 percent hunting for flaws; that is not what visitors see.
A worked example: slimming a blog page
Assume (numbers purely for illustrating the arithmetic) a page with 12 images, each an average 180 KB JPG, so about 2.1 MB of imagery in total. You want to convert them to WebP.
- Check the displayed size first. If the page container is 800 px but the source is 2400 px wide, use Image Resize to bring it to 1600 px (leaving room for high-density screens). This step often gains more than switching format.
- Then batch convert with Image to WebP at around 80 percent and download the ZIP.
- Compare each one: place the source and the WebP side by side in the same page. If the picture with a large blue-sky gradient shows banding, reconvert that one at 88.
- Use Image EXIF Viewer & Cleaner to confirm there is no location data. Output re-encoded through a canvas usually does not carry the original EXIF, but checking before publishing is the reliable route.
- Deploy it on the page with a fallback for older browsers, shown next.
The fallback pattern is below; the browser picks the first source it supports:
<picture>
<source srcset="photo.webp" type="image/webp">
<img src="photo.jpg" alt="Describe the image" width="1600" height="1200" loading="lazy">
</picture>To be clear, nearly every visitor's browser today can show WebP, so this fallback mostly covers rare old devices. The real need for a fallback is usually not the browser but the case where an image gets downloaded and opened in old software, and there a JPG copy is the safer option. And if you use Next.js's image component, it already serves WebP and other formats depending on the browser, so you often do not need to convert each file by hand.
Transparency and animation
- Transparency: WebP supports it, together with lossy compression, which is its main advantage over JPG. After conversion check the edges for grey fringing and raise quality if you see any.
- Animated GIF: the current static converter does not keep the full frame sequence, so a GIF source gives a single still image. For animation, split it with GIF Split / Compose, or use a dedicated tool that writes animated WebP.
- SVG: converting to WebP rasterises the vector into a fixed-size bitmap that no longer scales losslessly. If an icon or logo can be used as SVG directly, do not convert it.
- AVIF source: it can be converted to WebP, but going from one lossy format to another adds loss again, so start from the highest-quality original available.
Why a file can grow after conversion
| Symptom | Cause | Fix |
|---|---|---|
| A tiny icon got larger | Already-small PNG or JPG where container overhead dominates | Keep the original format, or use SVG |
| A heavily compressed JPG barely changes | Lossy to lossy re-encoding gains little and stacks loss | Convert from the original high-quality source where possible |
| Screenshot or flat-colour image larger at high quality | Lossless or high-quality PNG is already efficient on large flat areas | Compare the real sizes; keep PNG if WebP does not win |
| Quality set too high | Above 90 percent size grows fast for almost no visible gain | Drop to the lowest setting that looks identical |
| Dimensions never reduced | Pixel count unchanged, so format gains are limited | Use Image Resize to the size really needed first |
Other pitfalls
- The browser cannot encode WebP: a few browsers cannot export a canvas as WebP. The page then says this browser cannot export the format; try a different browser.
- Downstream systems refuse it: some content management systems, email clients and old office software do not recognise WebP. Test with one real upload or open.
- OS previews do not show it: recent systems usually do, older ones need an extension, so keep a JPG copy.
- Metadata is gone: output normally has no original EXIF (capture time, camera model, GPS). That helps privacy but means copyright fields need separate handling.
- Server configuration: if you host the images yourself, make sure .webp is served as image/webp, otherwise some browsers may not display it.
Choosing a format for web pages
| Scenario | Recommended format | Reason |
|---|---|---|
| Photographic images | WebP (AVIF where justified) | Usually smaller than JPG at similar appearance |
| Graphics needing transparency | WebP or PNG | WebP can be lossy with alpha; PNG has the best compatibility |
| Icons and logos | SVG | Vector, scales to any size, small |
| Sent to third parties, printed or emailed | JPG / PNG | Compatibility first |
| Simple animation | Animated WebP or video | Much smaller than GIF, but needs suitable tooling |
When not to convert to WebP
- The image is going to a print shop or a recipient with older software; they most likely accept only JPG, PNG or TIFF.
- You need an archive that keeps EXIF, GPS or full colour profiles. Conversion drops them; store the original.
- The source is already tiny or heavily compressed. The gain is small and you may lose quality a second time.
- The target platform explicitly accepts only JPG or PNG. Compatibility beats size.
- You need animation. The static converter does not preserve it; use a dedicated tool.
In short: photographs and large web images suit WebP, icons suit SVG, and compatibility-first situations keep JPG or PNG. Before any bulk run, validate your quality setting on a few representative images, then scale up.