A .webp extension names a container, not a format. Every one of the 16 files I inspected began with the same 12 bytes — RIFF, a length, WEBP — and then split into five different chunk layouts underneath. A batch converter sees one extension and applies one setting to all of them. On my 16-file folder that produced 14 files larger than their sources and 2 smaller, and the kind of file underneath — not the quality slider — decided which.
Read four bytes before you convert anything. Bytes 12–15 name the format: VP8 is lossy, VP8L is lossless, VP8X means extra chunks are present (transparency, animation, colour profile, EXIF) and you have to look further. A folder of .webp files is a folder of five unrelated formats wearing the same name.
The container is always the same shape. Twelve bytes of header, then a list of chunks, each one a four-byte identifier and a length.
| Bytes 12–15 | What the file is | Files | What a JPG batch does to it |
|---|---|---|---|
| VP8 | Lossy, no alpha | 7 | Re-encodes what is already lossy — and usually larger |
| VP8L | Lossless | 5 | Throws away the exactness it paid bytes for |
| VP8X | Extended: alpha, animation, ICC, EXIF | 4 | One JPG rule applied to four different problems |
Underneath VP8X the chunks get specific. I read the full chunk list of all 16 files and found five distinct layouts: bare VP8 (7 files), bare VP8L (5), VP8X+ALPH+VP8 (2), VP8X+ICCP+VP8 +EXIF (1), and VP8X+ANIM+six ANMF frames (1).
Three of the 16 files carry transparency, and only two of them advertise it with an ALPH chunk. The third is a VP8L file that carries its alpha inside the lossless bitstream, so a scan for ALPH alone misses it. You cannot know what a WebP holds from its name, and the name is all a batch tool gets.
Same extension, same first 12 bytes, five different files after that. The colour codes the chunk role.
I converted all 16 files at JPG quality 92 and weighed each one. Grouped by the chunk layout above:
| Kind | n | Bytes in | Bytes out | Times |
|---|---|---|---|---|
Lossy VP8 | 7 | 686,976 | 1,245,623 | 1.81× |
Lossless VP8L | 5 | 2,321,598 | 476,967 | 0.21× |
| Transparent | 2 | 32,764 | 69,481 | 2.12× |
| Lossy + ICC + EXIF | 1 | 10,544 | 48,019 | 4.55× |
| Animated | 1 | 12,734 | 12,179 | 0.96× |
The lossless row looks like the winner until you open it. It is one photograph. That file alone is 2,317,360 bytes — 75.62% of everything that went into the folder — and it fell to 321,931 bytes. The other four lossless files went the other way: a 508-byte flat interface graphic became 46,354 bytes, 91.25× bigger. A 794-byte gradient became 39,653 bytes, 49.94×.
That is the thing worth holding onto. Lossless WebP compresses flat and synthetic content enormously well, and JPG cannot match it on that material. The whole folder shrank 39.56% — 3,064,616 bytes down to 1,852,269 — on the strength of a single photograph. Across all 16 files the median file grew 7.65×, and the spread between the best file and the worst was 656.8×.
The JPG output size carries no memory of the quality the source was encoded at.
I encoded one master image as WebP twice, at quality 60 and at quality 80. The two WebPs differ by 7,004 bytes and by 224,527 pixels that move more than 2 levels. Their PSNR against each other is 46.746 dB. They are visibly different files.
Then I converted each to JPG at quality 92. The outputs came out 111,379 bytes and 111,363 bytes — 16 bytes apart. And yet 1,380,666 of their pixels differ at all, 359,495 differ by more than 2 levels, and the worst pixel differs by 42. Two files that look like the same size carry different pictures.
That follows from what the JPG encoder is given. It receives decoded pixels, not the source file's settings, so it picks its own quality for the same content. Nothing in the output records the 60 or the 80. If you are tracking what a folder was before conversion, the JPG byte count will not tell you.
The reverse is also true, and it is the more useful half. If the source WebP was lossy, its own damage is already in the pixels, and a JPG re-encode cannot undo damage that a JPG could not have encoded in the first place.
| JPG quality | Bytes | vs the WebP | vs the master |
|---|---|---|---|
| 60 | 75,370 | 44.581 dB | 41.073 dB |
| 75 | 82,440 | 46.760 dB | 42.081 dB |
| 85 | 93,485 | 48.472 dB | 42.541 dB |
| 92 | 111,363 | 49.564 dB | 42.830 dB |
| 98 | 171,417 | 50.885 dB | 42.990 dB |
The source lossy WebP scores 43.809 dB against the master. Every JPG I produced lands below that, including quality 98 at 171,417 bytes — 6.85× the WebP's size and still 0.819 dB short of where the WebP already was. From a lossless source the gap is wider still: the WebP is pixel-exact against the master, and the best JPG reaches 46.571 dB at 1,086,978 bytes, 14.1× the quality-60 size for 4.45 dB more.
So the slider cannot recover a lossy source. It only decides how much extra damage you accept on top of the damage that is already there.
A WebP with transparency stores its alpha in a separate ALPH chunk, separate from the colour data. What colour sits underneath those transparent pixels is a decision, and two decoders I tested made different ones.
I decoded the same transparent file in Chrome's canvas and in a standard image library, then compared them pixel by pixel. Fully opaque pixels matched exactly in every file I tried — all 647,094 of them in the logo, all 282,357 in the soft-edge image. Zero difference. The alpha channel itself was identical everywhere.
The transparent pixels were another story. In the logo file, 21,338 pixels had different colour values between the two decoders; 13,559 of them differed by more than 2 levels, and the worst was 255 — the full range. Every one of those 13,559 sits in the fully transparent region, where one decoder stored black and the other kept the colour that was written underneath. In the soft-edge file, 21,843 pixels differed by more than 2 levels with a worst case of 18, and there they split between 936 fully transparent pixels and 20,907 partially transparent ones. In the partially transparent band the two decoders averaged 95.66/18.36/13.46 and 97.76/19.60/14.60.
A model where the colour is premultiplied by alpha matches the browser on 90.0% of the logo's pixels and 94.836% of the soft-edge file's. Neither decoder is obviously broken. They simply disagree about what colour a transparent pixel is, and the fill you end up with depends on which one your tool uses.
The animated file in my folder holds six frames at 120 ms each, 12,734 bytes in total, stored as VP8X+ANIM plus six ANMF chunks. A JPG batch cannot represent that. It writes one JPG.
Frame 1 came out at 12,179 bytes. Converting all six frames separately gave 12,179, 12,447, 12,973, 12,468, 12,011 and 12,441 bytes — 74,519 in total. Keeping only the first frame drops 62,340 bytes of frame content, and the frames are not interchangeable: frame 2 differs from frame 1 in 13,801 of 540,000 pixels, and the last frame differs from the first in 20,452.
Nothing warns you. The output is a valid JPG of the right dimensions, and the motion is simply gone.
The file with ICCP and EXIF chunks carried a 588-byte colour profile and a 52-byte EXIF block with an orientation tag of 6 and a camera make. I wrote it out as a JPG with default settings. The EXIF came back at 0 bytes, the orientation tag came back null, the colour profile came back at 0 bytes.
Passing the EXIF bytes through directly did not help either: still 0 readable bytes and a null orientation. The reason is that a WebP stores EXIF as a bare TIFF header, while a JPEG expects its APP1 segment to begin with the six-byte identifier Exif\0\0 before the TIFF data. I confirmed that in the output file — the APP1 segment was there, but it started straight into MM* instead of the identifier, so no reader could parse it.
Prefixing those six bytes by hand made it work. The EXIF came back as 58 bytes, the orientation read back as 6, and the file was 48,081 bytes. The colour profile behaved differently and better: passing it as an ICC profile kept all 588 bytes and added 606 bytes to the file, 48,625 against 48,019.
A lossless WebP can hold 16-bit colour, and a batch tool has no way to know whether yours does. My 16-bit gradient file was 194 bytes and decoded to 8 distinct values — the full 0–255 range, and nothing more. The master PNG it was made from had 1,600 distinct values across that row. The depth was lost when the WebP was written, not when the JPG was made. The JPG came out at 8,679 bytes, still holding 8 values, with a maximum 16-bit to 8-bit shift of 253 levels.
Worth checking before you chase a quality setting on a file that already lost the thing you wanted to keep.
I copied a .webp to .jpg and to .png without touching the bytes. Both copies still opened as WebP, 25,014 bytes, 2400×1600. The extension is a label; the codec is the first four bytes, RIFF, with WEBP waiting at offset 8.
A tool that trusts the extension gets a file it cannot identify, or worse, one it identifies by name and decodes as something else. This is the same trap as the PNG side of a batch, where a renamed file simply fails to open, but WebP is quieter about it — see the PNG to JPG batch for that half of the story.
VP8X flag byte on extended files. It carries five one-bit flags: colour profile, alpha, EXIF, XMP and animation.Related: batch convert PNG to JPG, where transparency comes from, what the quality slider does to one file, resizing a whole folder.
Start by reading the header of each file, because "bulk" hides the part that matters. Bytes 12–15 of a WebP say whether the file is lossy (VP8 ), lossless (VP8L) or extended (VP8X), and the extended flag byte then tells you whether alpha, a colour profile, EXIF or animation is present. On my 16-file folder, applying one setting to all of them grew 14 files and shrank 2, because one photograph was lossless and the rest were not.
The operating system is the easy part; what the file contains is the part that decides the result. On my 16-file folder a full decode and re-encode took 651.5 ms, about 40.72 ms per file, so 200 files would land near 8.1 s if the cost stays linear — that is 651.5 ÷ 16 × 200, arithmetic on one measurement rather than a benchmark of any tool you own. Check bytes 12–15 first, then convert one file of each kind and read the output back before you queue the rest.
The same three checks apply whatever the machine is. Find out whether each file is lossy or lossless, whether it has an alpha channel, and whether it is animated. Then set the fill colour for transparent pixels deliberately rather than accepting the default, and expect a lossless source to come out smaller than its lossy neighbours only when the content is photographic — on flat graphics the lossless WebP was 91.25× smaller than the JPG it produced.
Convert first and delete second, and never on the first pass. A JPG batch drops everything a JPG cannot hold: the extra frames of an animation, the exactness of a lossless file, the alpha channel, and any EXIF or colour profile unless those are passed through explicitly. I converted a six-frame animation to one JPG and 62,340 bytes of frame content went with it, and a default write dropped a 588-byte colour profile and a 52-byte EXIF block entirely. Check the output, then remove the sources.