Image
JPG, PNG or WebP: which image format should you choose? Our measurements on two real images
You read everywhere that WebP is lighter than JPG and that PNG is higher quality. That is sometimes true, sometimes false, and above all very dependent on the image. Rather than repeating these generalities, we converted two real images with FileXvert's exact settings, and measured both the size of the result and its fidelity to the original. The results contradict some common beliefs.
Three formats, three approaches
JPG (or JPEG) dates back to 1992. It splits the image into 8 × 8 pixel blocks and discards the fine details the eye notices least. This compression is lossy: the decoded image is never exactly the original, and each new JPG save adds a little degradation. In return, it opens absolutely everywhere.
PNG is lossless: every pixel is restored exactly. It supports transparency, which makes it the natural format for logos, icons and screenshots. Its compression works well on flat colours and sharp text, much less on a photo, where almost every pixel differs from its neighbour.
WebP, introduced by Google in 2010, can do both: lossy compression that is more modern than JPG's, and a lossless mode. It also supports transparency. Every current browser reads it, but some software, government forms and print shops still handle it poorly.
How we measured
We used two images with opposite profiles. The first is a beach photo taken with a smartphone: 2048 × 1152 pixels, already saved as JPG (529 KB), with a lot of fine texture (pebbles). The second is a photo of a printed letter, as a lossless PNG: 4164 × 9248 pixels, 29.5 MB, mostly black text on a light background.
Each image was converted with FFmpeg using the parameters FileXvert applies at each level: no reduction, balanced reduction and smallest size. Fidelity is measured with the SSIM index, which compares the structure of the converted image with the original: 1 means identical, and above 0.99 the differences are in practice invisible to the naked eye. Below 0.97, flaws become noticeable when zooming in.
Result 1: a photo that is already a JPG
On the beach photo, the finding is clear: converting it to PNG multiplies its size by almost eight, without the slightest improvement. The PNG faithfully preserves… the compression artefacts of the original JPG. This is the most common mistake: a PNG never adds quality that was no longer in the source file.
| Format and level | Size | SSIM |
|---|---|---|
| PNG (lossless) | 4.11 MB | 0.995 |
| JPG, no reduction | 694 KB | 0.998 |
| JPG, balanced | 557 KB | 0.995 |
| JPG, smallest | 427 KB | 0.985 |
| WebP, no reduction | 906 KB | 0.993 |
| WebP, balanced | 573 KB | 0.983 |
| WebP, smallest | 455 KB | 0.976 |
More surprisingly, WebP gains nothing on this image. At a comparable size, the balanced JPG (557 KB) is more faithful than the balanced WebP (573 KB). There are two reasons: the source was already a JPG, whose block structure re-compresses well as JPG, and the very fine pebble texture is a hard case for WebP. Note also that no conversion goes clearly below the original size without visible loss: re-encoding a JPG does not optimise it, it only adds another generation of compression.
Result 2: a photographed document saved as PNG
With the photographed letter, the story is completely different. The source is a 29.5 MB lossless PNG, far too heavy to send by email or upload to an online form.
| Format and level | Size | SSIM |
|---|---|---|
| PNG (lossless) | 29.2 MB | 1.000 |
| JPG, no reduction | 4.74 MB | 0.992 |
| JPG, balanced | 1.92 MB | 0.979 |
| JPG, smallest | 1.24 MB | 0.972 |
| WebP, no reduction | 3.66 MB | 0.992 |
| WebP, balanced | 1.09 MB | 0.981 |
| WebP, smallest | 632 KB | 0.977 |
Here WebP delivers: at equal fidelity (0.992), it is 23% smaller than JPG; at the balanced level, it is both lighter (1.09 MB versus 1.92 MB) and slightly more faithful. Large areas of plain paper and the sharp edges of text suit it far better than the texture of a nature photo.
Another lesson: going from a 29.5 MB PNG to a JPG or WebP with no reduction already divides the size by six to eight with no visible difference. For a document you need to upload, that is often the only step required.
Key takeaways
These two measurements do not replace a test on your own images, but they point to reliable rules:
- A photo to send, print or upload to an official website: JPG. It is the most compatible choice, and on a photo it holds its own against WebP.
- A screenshot, logo, diagram or image with transparency: PNG, unless its size is a problem.
- An image for a website, or a scanned document you need to shrink a lot: WebP, if the recipient accepts it.
- Never convert a JPG photo to PNG to improve its quality: the file gets bigger, the image stays the same.
- Keep the original: every lossy conversion is final, and comparing with the source is the only way to judge the result.
What about AVIF?
AVIF, even more recent, often compresses better than WebP. FileXvert cannot produce it today, however: the build of FFmpeg compiled for the browser contains no AV1 encoder, which the format relies on. Rather than offer a conversion that would fail, we removed it from the list. For the web, WebP remains an excellent compromise, read by every current browser.