Chuantu.de

WebP, PNG or JPG: which format should this image be?

Most people pick a format by habit — screenshots become PNG, photos become JPG — and then wonder why the page is slow or why the text looks fuzzy. The decision only needs two facts: does the image contain large areas of flat colour and sharp text, or continuous tone and noise?

Convert or compress an image Upload and host it

The short rule

ImageFormatWhy
Screenshot, UI, chart, code, logoPNG, or WebP losslessSharp edges and flat colour; JPG puts coloured noise around every letter
Photograph, product shot, gradientWebP (lossy), JPG as fallbackContinuous tone compresses well; the eye tolerates small errors in noise
Anything with transparencyPNG or WebPJPG has no alpha channel at all
AnimationWebP, or GIF if the platform demands itWebP animation is typically far smaller than GIF at similar quality
Needs further editing laterKeep a PNG or the original RAW/sourceLossy formats lose information with each save

Why JPG fails on text

JPG was designed for photographs. It divides the image into blocks and discards detail the eye is unlikely to notice in continuous tone — which is exactly the detail that defines a letterform. Screenshot a dialog box, save it as JPG at quality 80, and the text picks up grey and coloured fringes along every edge. Increase the quality to hide it and the file grows past the PNG it replaced. That is why screenshots belong in PNG or lossless WebP.

Where WebP wins

The catch is tooling: old image editors, CMS plugins and email clients may not accept or display WebP. For email, stick to JPG and PNG — support in mail clients is still uneven.

Settings that matter more than the format

  1. Resize before compressing. A 4000-pixel-wide photo displayed at 800 pixels is four times the pixels you need. Exporting at the display size halves the file before any quality dial is touched.
  2. JPG quality 75–85. Below 70 the artefacts appear in gradients and skin tones; above 90 the file size climbs steeply for detail nobody sees.
  3. PNG: reduce the palette when you can. A screenshot of flat UI often survives 128 colours with no visible change and shrinks by half.
  4. Strip metadata. EXIF carries GPS coordinates, camera serial numbers and sometimes the author’s name. Most web exports can drop it in one checkbox; the toolbox has a dedicated EXIF removal step.

A worked example

A 1440×900 screenshot of a settings panel, exported from a Retina display:

ExportApproximate sizeVerdict
PNG at full resolution1.4 MBToo heavy for a web page, fine as a download
JPG quality 80380 KBSmaller, but the labels are visibly fuzzy
PNG scaled to 1200 px wide310 KBReadable, acceptable
WebP lossless at 1200 px190 KBSame pixels, much smaller
WebP lossy q85 at 1200 px70 KBBest for a page; check the small text at 100%

Exact numbers vary with content, but the ordering holds: resize first, then choose lossless for text, lossy for photographs, and WebP wherever it is accepted.

After the format choice

A converted file still needs somewhere to live and a URL to point at. Upload it, copy the direct link, and use it in an <img> tag, a CSS background or a Markdown file. If the page mixes formats, or you are unsure whether a viewer will accept WebP, export a JPG fallback and reference both with <picture>.

FAQ

Does converting PNG to JPG lose quality permanently?
Yes — lossy conversion discards data. Keep the PNG or the original capture if you may need to re-export later.
Is GIF still acceptable?
Only where a platform insists on it. GIF is limited to 256 colours and is usually several times larger than an equivalent WebP animation.
Do hosted images keep their format?
Yes. Uploaded files are served as uploaded — no silent re-encoding — so a PNG stays a PNG and behaves the same for everyone who opens the link.
What about AVIF?
Better compression than WebP on many photographs, but slower to encode and still uneven in older browsers and tooling. Reasonable as a progressive enhancement, awkward as the only format.