Skip to content
ImageDoctor
Comparison7 min read

WebP vs JPG vs PNG: which format is best for websites?

For web use the answer is usually WebP, and it has been for a while. The useful part is knowing why, where the exceptions are, and whether you still need a JPEG fallback in 2026.

Processed locally in your browser

Web images have to do three things: look right, stay small, and open everywhere. JPEG is unbeatable at the third. PNG owns transparency and sharp edges. WebP was designed specifically to cover both jobs, and since browser support settled, it does.

If you want the four-way comparison including AVIF, read JPG vs PNG vs WebP vs AVIF. This one is about choosing what to ship on a website.

Side by side

JPGPNGWebP
CompressionLossy onlyLossless onlyBoth
TransparencyNoYesYes
Typical size, photoBaselineMuch largerSmaller than JPEG
Typical size, screenshotPoor qualityLarge but sharpMuch smaller, still sharp
Browser supportUniversalUniversalAll current browsers
Outside the browserOpens anywhereOpens anywhereOccasional gaps in older software

The size figures depend heavily on the image, and anyone quoting a single percentage is oversimplifying. The direction, though, is consistent: at matched visual quality WebP files come out smaller than JPEG, and much smaller than PNG for anything screenshot-like.

Why WebP is the default for the web

WebP is the only one of the three that handles every case a website has. Lossy mode for photographs, lossless mode for graphics, an alpha channel for cutouts and logos. One format, one pipeline, fewer decisions per image.

The largest single win on most sites is converting PNG screenshots and UI images. Those are frequently the heaviest files on a page, and lossy WebP at quality 85–90 holds text crisply while cutting the size substantially.

Do you still need a JPEG fallback?

Every actively maintained browser has supported WebP for years, so for ordinary website images a fallback is no longer the default requirement it once was. Serving WebP directly is a reasonable decision for most sites.

There are still reasons to keep one. If your analytics show meaningful traffic from very old devices, or the images are also consumed by email clients, feed readers, or third-party software you do not control, a fallback is cheap insurance. The <picture> element handles it without JavaScript:

  • <picture> with a <source type="image/webp"> and an <img> pointing at the JPEG.
  • The browser takes the first source it understands, so newer ones get WebP and everything else gets the JPEG.
  • Keep width and height on the <img> either way — that is what reserves the space and prevents layout shift.

Choosing per image

ImageUseWhy
Hero photographWebP q80 (AVIF if available)Smallest file at the size that matters most
Article photographWebP q80Consistent pipeline, small files
Screenshot with textWebP q85–90Keeps text sharp, far smaller than PNG
Logo with transparencySVG, else lossless WebPVector is tiny; WebP keeps the alpha
Download / press kitJPG or PNGOpens in anything the recipient has
Email imageJPG or PNGClient support is less predictable

Converting your existing images

  1. Start with the heaviest filesSort by size in your browser's Network tab. A handful of images usually account for most of the page weight.
  2. Resize before convertingDimensions save more bytes than the format does. Cap the long edge first.
  3. Convert in one passOpen the Image Converter, drop in a folder, choose WebP, set quality 80 and download the ZIP.
  4. Spot-check the awkward onesSaturated reds, fine text and subtle gradients are where lossy WebP can shift. Check those at 100% zoom.
  5. Update the referencesFilenames keep their stems, so the change is usually a search and replace of the extension in your templates or content.

Two rules that cover almost everything

  1. On a website you control: WebP. Quality 80 for photographs, 85–90 for anything with text, lossless for flat graphics.
  2. For a file leaving your website: JPG for photos, PNG for graphics. Compatibility beats a few kilobytes when you do not know what will open it.

Image Optimizer applies the first rule in one step — capping dimensions, converting and stripping metadata with web defaults already set.

Common questions

For images served on a site you control, generally yes: it produces smaller files than JPEG at comparable quality, replaces PNG for graphics and transparency, and every current browser supports it.

All actively maintained browsers do. Support outside the browser — older desktop software and some office tools — is less consistent, so use JPG or PNG for files people will download.

Yes, WebP has a full alpha channel in both its lossy and lossless modes, which is why it can replace PNG for logos and cutouts.

AVIF usually produces the smallest files and handles gradients better, but encoding is slower and tooling support is thinner. WebP is the safer default; AVIF is worth it for large hero images.

Open the ImageDoctor Image Converter, add one file or a whole folder, choose WebP as the output and download. It runs in your browser, so nothing is uploaded.

Tools in this article

All blog