JPEG or WebP for web uploads? A decision you can stop worrying about

Both formats work everywhere that matters now. The real question is which one your receiving system accepts and what it does to your transparency.

Baca dalam bahasa Indonesia

A web page displayed on a tablet screen
A web page displayed on a tablet screenImage: Johnnydoes website on iPad by Johnny does · CC BY 2.0

The JPEG-versus-WebP question is asked far more often than it deserves. In practice the answer is decided by two things: whether the system receiving your file accepts WebP, and whether your image has transparency. Everything else is a rounding error.

The short version

Use WebP when you control where the image goes — your own site, a modern marketplace, a social platform. It produces a smaller file at the same visual quality.

Use JPEG when a form, portal, or piece of software has to accept it and you cannot test that in advance. Compatibility failures look like “invalid file type” errors that users cannot diagnose.

Use PNG when the image has transparency or is not photographic — screenshots, logos, diagrams.

What actually differs

Both JPEG and WebP are lossy formats at typical settings. The difference is how efficiently they spend bytes.

File size. For photographic content, WebP at equivalent visual quality typically lands 25–35% smaller than JPEG. That is a meaningful saving, and it often decides whether you can meet a size limit without reducing dimensions.

Transparency. JPEG has none. Any transparent area is filled with a colour, usually white. WebP supports an alpha channel, so a cut-out product shot keeps its transparent background.

Browser support. Every current browser reads WebP — Chrome, Firefox, Safari, Edge. Safari has supported it since version 14, released in 2020. For a website, this is no longer a practical concern.

Software support. This is the weak point. Older desktop applications, image editors, some print workflows, and a surprising number of government upload portals still expect .jpg. A file that opens perfectly in a browser can be rejected by an office document system.

Metadata. Re-encoding to either format strips most EXIF data, including GPS coordinates. Both are fine on that front.

Why JPEG still exists

JPEG has been in use since 1992. That history is the point: it is the one image format that essentially every device, application, and upload form on earth can read. When you do not know the receiving system, JPEG is the safe default not because it is better, but because it is never wrong.

WebP is technically superior and operationally riskier in exactly one scenario: an untested upload target.

The transparency trap

Converting a PNG with a transparent background to JPEG does not fail loudly. It produces a file that looks correct except that the transparent area is now solid white. If that image sits on a coloured page, the white box becomes obvious later.

If you need a JPEG of a cut-out image, choose a background colour deliberately — match the destination background. Doculven asks for that colour rather than assuming white for this reason.

A workflow that avoids the question

  1. Determine the destination rule first. Read the upload form’s accepted file types. If it says “JPG, PNG”, do not send WebP.
  2. Match the content type. Photograph → JPEG or WebP. Screenshot or logo → PNG.
  3. If the destination is unknown, produce JPEG. It is the lowest-risk choice.
  4. If size is the binding constraint, try WebP first, then fall back to JPEG with reduced dimensions.
  5. Verify the result by opening the downloaded file, not just by reading the success message.

What not to do

Do not convert a JPEG to WebP and back to JPEG as a way of “optimizing”. Each lossy round trip adds artifacts without recovering any quality. Always start from the original file.

Do not assume a smaller file is a better file. A 40 KB image that looks smeared on a retina display is worse than a 180 KB image that looks clean. The correct target is the smallest file that still looks right at its display size.