Chip in

WEBP vs PNG

WEBP is smaller than PNG for the same picture, usually by a third to a half, and keeps transparency. Use PNG when the file has to open absolutely anywhere or go into older software; use WEBP for anything on the web.

Last updated

Choose WEBP when

  • Images on a website, where every kilobyte is load time.
  • Graphics with transparency that still need to be small.
  • Anywhere you would have used PNG but the file came out too large.

Choose PNG when

  • Files going into older design tools or printing workflows.
  • Anything that has to open on a machine you do not control.
  • Archival copies, where the widest possible support outlives the size saving.

What WEBP actually is

WEBP does both jobs in one format: a lossy mode that beats JPG at the same visual quality, and a lossless mode that beats PNG. Unlike JPG it keeps an alpha channel, so a lossy image can still have a transparent background, which is the combination the web wanted for twenty years.

A WEBP renamed to .jpg still fails validation, because uploaders read the first bytes of the file rather than the name. Convert it properly.

What PNG actually is

PNG stores every pixel exactly as it was, using a compression method that throws nothing away. It carries a full alpha channel, so a pixel can be any degree of transparent rather than simply on or off, and it handles up to 16 bits per colour channel.

People save photographs as PNG and wonder why an email bounces. A photo that is 400 KB as a JPG is routinely 4 MB as a PNG, because lossless compression cannot do much with the noise in a real photograph.

WEBP and PNG side by side

WEBP compared with PNG
 WEBPPNG
Extension.webp.png
Media typeimage/webpimage/png
CompressionLossyLossless
TransparencyYesYes
AnimationYesNo
Quality settingYesNot applicable
We can write itYesYes

Questions

Is WEBP lossless like PNG?

It can be either. Lossless WEBP is a direct replacement for PNG and still comes out smaller. Lossy WEBP goes much smaller again and is the one to use for photographs.

Does everything open WEBP now?

Every current browser does, and Windows and macOS both preview it. Older design software is where it still trips up.