Lean Image
Open menu

The WebP format

WebP is Google’s attempt to replace JPEG and PNG at the same time, and it is really two formats wearing one extension: a lossy codec lifted out of the VP8 video encoder, and an unrelated lossless codec added a year later. Nothing on the outside of the file tells you which one you have. That, and a hard limit on how large a WebP can be, account for most of the surprises people run into.

WebP at a glance

Introduced
2010 · Google
File extensions
.webp
MIME type
image/webp
Compression
Lossy or lossless
Transparency
Yes, with soft edges
Animation
Yes
Colour depth
8 bits per channel
Wide gamut
sRGB only
High dynamic range
No
Maximum dimension
16,383 px per side
Support
Every current browser; some older software will not

Lean Image reads WebP and writes it.

Where it came from

Google bought On2 Technologies in February 2010, mainly for the VP8 video codec, released it, and then made the observation the whole industry keeps making: a video codec’s keyframe is already an excellent still-image compressor. Lossy WebP is a single VP8 keyframe in a RIFF container. That is not a comparison — it is the same bitstream, with a different wrapper.

Lossless WebP arrived a year later and shares nothing with it but that wrapper. It is a separate design: colour transforms, an optional palette, backward references into what has already been decoded, and its own entropy coding. On the material PNG is good at, it is around a quarter smaller than PNG while staying exact.

Two formats, one extension

Both modes are .webp, both are image/webp, and neither the name nor the icon tells you which you have. This has consequences worth knowing about.

A WebP is not automatically small: a lossless WebP of a photograph can be enormous. A WebP is not automatically lossy either, so converting one to PNG may be a genuinely exact operation or may be preserving somebody else’s compression artefacts at three times the size. And a lossy WebP that came from a JPEG has been through two lossy encoders, so a further round trip is a worse idea than the file size suggests.

The 16,383 pixel wall

VP8 stores frame dimensions in 14 bits. The largest number 14 bits can express is 16,383, and no WebP encoder anywhere can exceed it on either axis. It is not a setting, not a limitation of one tool, and not something a newer release fixes.

Most people meet it as an export that simply failed: a stitched panorama, a full-page screenshot of a long document, a scan at high dpi. If a conversion to WebP refuses your image, check the dimensions before anything else. The fix is to resize under the limit, or to pick a format that does not have one — JPEG stops at 65,535 pixels per side, and PNG and AVIF have no practical limit at all.

Why it turns up as a problem

The usual story is not that somebody chose WebP. It is that they saved an image from a web page, and the file that landed in their downloads folder was in a format their own software had never heard of. Browsers adopted WebP over a decade, finishing with Safari in 2020; the applications people actually edit and print with lagged behind by years, and some never moved.

So WebP is simultaneously the sensible default for images you are serving to browsers and a recurring nuisance for images being handed to anything else. Both of those are true at once, and which one you are living in depends entirely on where the file is going next.

What to convert it to

JPG if something rejected the file. It is the format with no compatibility question attached, and if the WebP was lossy you are converting one lossy format to another, so use a high quality setting to avoid stacking the losses.

PNG if the image is a screenshot, a logo or line art, if it needs to keep soft transparency, or if you want the widest possible software support without a lossy step.

AVIF if it is staying on the web and you want it smaller still. Same browsers, better compression, slower to encode.

Convert a WebP into something else

Convert something else into WebP

Questions about WebP

Why will my WebP not open?

Almost always because the software is older than the format’s support. Every current browser displays WebP, but plenty of desktop applications, office suites, older phones and print workflows never caught up. Converting it to JPG or PNG is usually the entire fix.

Is WebP lossy or lossless?

Either — it is decided per file and there is no way to tell from the outside. A screenshot saved by a browser or a capture tool is usually lossless; an image served by a website is usually lossy. Anything written here is the lossy mode, because a browser canvas encoder takes a quality number.

Why does my image refuse to convert to WebP?

Check the dimensions. No WebP can exceed 16,383 pixels on either side, because VP8 stores frame dimensions in 14 bits. A panorama, a full-page screenshot or a high-resolution scan will hit that wall, and no encoder or newer version gets around it.

Is WebP better than JPEG?

On file size, comfortably — and it also carries transparency and animation, which JPEG cannot. On the only other question that matters, whether the recipient can open it, JPEG still wins outright outside a browser. Pick by where the image is going.

Does converting a WebP to PNG restore the quality?

No. If the WebP was lossy, the detail is already gone and PNG preserves what remains exactly, artefacts included, in a much larger file. If it was lossless, the conversion is genuinely pixel-for-pixel and you are only changing the container.

Work with a WebP file

Drop one in and see what comes out, without uploading anything.