Back to Glossary
Design & Typography

WebP vs. PNG

What Is the Difference Between WebP and PNG?

PNG is always lossless, while a WebP file is either lossy or lossless, and the .webp name doesn’t say which. Both keep transparency, but only PNG stores 16 bits per color channel or images wider or taller than 16,383 px.

Check what’s inside a WebP or PNG file

Pick a sample or one of your own files to see its mode, bit depth and transparency, and what switching to the other format would keep.

As PNG: Every pixel stays, but the lost detail can’t return.

Format
WebP, lossy (VP8)
Color
8-bit color, 4:2:0
Size
720 × 720 px, 13 KB
Transparency
Separate alpha channel
Metadata
None

Is WebP Smaller Than PNG?

Usually, yes, for the same pixels. Google’s WebP documentation puts lossless WebP files at about 26% smaller than PNGs, and in its tests on 12,000 PNG images from the web, lossless WebP beat size-optimized PNG on over 99% of them. Lossy WebP gets smaller still by throwing detail away, so it is a different trade-off; lossy vs lossless explains where each one fits.

Lossless WebP keeps every visible pixel

For an 8-bit PNG, it stores the same red, green, blue and alpha values. By default, Google’s encoder may still change the color under fully transparent pixels, which can’t be seen, unless its exact setting is on.

Lossy WebP shares one color sample among four pixels

It is built on the VP8 video format and always uses 4:2:0 chroma subsampling, which keeps brightness for every pixel but a single color value for each 2 × 2 block. Thin colored lines and small colored text can turn soft.

Some images grow as WebP

Google lists the usual cases: a PNG with few colors saved as lossy WebP, since the color conversion adds new shades, and a JPEG saved as lossless WebP. Encoder speed matters too, as the fast lossless levels in Google’s cwebp tool make larger files.

How Do WebP and PNG Compare?

WebP and PNG differ most in compression, bit depth and the largest image they can hold. Transparency, color profiles and animation are available in both, though PNG needs its animated extension, APNG, for moving images.

WebP and PNG side by side
  WebP PNG
Mode Lossy or lossless Lossless
Alpha channel In both modes Yes, or in the palette
Bits per channel 8 Up to 16
Largest image 16,383 px a side Over 2 billion px a side
Moving images Built in As APNG
Color profiles ICC profile ICC profile
Browser support Every current major browser Every browser

WebP or PNG: Which Should You Use?

Use WebP for images people view on screen, where a smaller file loads faster, and PNG for 16-bit color, very large images and originals you keep editing. An online furniture shop, for example, can show product cutouts on its category pages as lossy WebP with transparent backgrounds and keep the PNG masters its photo studio delivers. When a photo needs no transparency, JPEG is another option, and PNG vs JPG compares it with PNG.

Use WebP for

  • Photos and cutouts on web pages

    Lossy WebP shrinks photos and keeps a transparent background, which JPEG can’t store.

  • Screenshots and interface images

    Lossless WebP keeps text and hard edges exact, usually in a smaller file than PNG.

  • Animated stickers and short loops

    One WebP file holds the frames, lossy or lossless, with an alpha channel.

Use PNG for

  • Images with 16-bit color

    Scans and renders saved at 16 bits per channel keep that depth only as PNG, since WebP stores 8.

  • Images over 16,383 px a side

    A long banner or a large map at full resolution doesn’t fit in a single WebP image.

  • Originals you keep editing

    PNG has no lossy mode, so a master copy can’t lose detail to a quality setting saved too low.

How WebP and PNG Export Works in CE.SDK

CE.SDK exports PNG and WebP on the web, iOS, Android and the server, so one design can leave the editor in both formats. A WebP export is lossless at its default quality of 1.0 and lossy below that.

Both formats keep the alpha channel when the page background is hidden, lossy WebP included. For thumbnails, the engine also has a preview export that always writes a small WebP at quality 0.8.

Export one design as WebP and as PNG
// Hide the page background so both files keep transparent edges.
engine.block.setFillEnabled(page, false);
// For the shop page: lossy WebP is smaller and keeps the alpha channel.
const webp = await engine.block.export(page, {
  mimeType: 'image/webp',
  webpQuality: 0.8
});
// The same artwork as a PNG for customers who download it.
const png = await engine.block.export(page, { mimeType: 'image/png' });
WebP export guide

FAQs

Yes, in both modes. Lossless WebP stores the alpha channel together with the color, and lossy WebP stores it in a separate chunk next to the lossy color, so a lossy file can still keep a soft shadow on a transparent background.

Look at the image chunk inside the file: VP8L means lossless and VP8 means lossy. An extended file starts with a VP8X chunk and has its image chunk further in. The file name never says which, and the checker on this page reads the chunk for you.

Not in lossless mode, where every visible pixel stays the same and only the color hidden under fully transparent pixels may change. Lossy mode drops detail and shares one color value among each block of four pixels, and either mode cuts a 16-bit PNG down to 8 bits per channel.

Usually because of the conversion. Google names two common cases: a PNG with few colors saved as lossy WebP, and a JPEG saved as lossless WebP. A fast encoder setting also makes lossless files larger. Try lossless for flat graphics and lossy for photos.

All current major browsers do, including Chrome, Edge, Firefox, Opera and Safari. Older versions of Safari can’t show it, so a page that has to reach old Apple devices can offer a PNG fallback in a picture element.