Search tools

Find a tool by name or what it does.

Image guides

Which image format should you actually use?

JPEG, PNG, WebP, AVIF, SVG. Five formats, endless arguing, and a decision that usually takes ten seconds once you know what the question really is.

5 min read

On this page

The question is not "which is best"

Every format comparison starts by ranking formats, which is the wrong shape for the problem. None of them is best. Each one throws away a different kind of information to make the file smaller, and the right choice is simply the one whose losses you will not notice in the specific image you have.

So the useful question is: what is in this picture? A photograph of a face, a screenshot of a spreadsheet, a logo, and a chart with a transparent background all fail in different ways under the same compression. Answer that and the format picks itself.

TL;DR

Photographs: AVIF, or WebP if you need wider support. Screenshots, diagrams and anything with text or hard edges: PNG, or WebP set to lossless. Logos and icons: SVG. Nothing you send to a client or a printer: never a lossy format twice.

Lossy and lossless, in one paragraph each

Lossy compression (JPEG, and by default WebP and AVIF) discards detail your eye is bad at noticing. It is extraordinarily effective on photographs, where noise and gradual tonal shifts hide the damage. It gets you files five to ten times smaller than the original with no visible cost, which is why the format has survived thirty years of attempts to replace it.

Lossless compression (PNG, and WebP or AVIF in lossless mode) throws nothing away. It finds repetition and encodes it more efficiently, so a screenshot full of flat colour compresses beautifully and a photograph barely compresses at all. Decode it and you get back exactly the pixels you started with, byte for byte.

The trap is that lossy compression is cumulative. Every save re-encodes and re-damages. A JPEG opened, cropped, and saved four times has visibly less detail than the original, and no tool can put it back. If a file is going to be edited again, keep a lossless master and export lossy copies from it.

Photographs

For anything camera-shaped, use AVIF if your audience allows it. At matched visual quality it typically lands 30 to 50 percent below JPEG, and it handles the two things JPEG is worst at: smooth skies, which JPEG bands into visible steps, and deep shadows, which JPEG fills with blocky artefacts.

WebP is the pragmatic middle. It is meaningfully smaller than JPEG, roughly 25 to 35 percent at the same quality, and it is supported essentially everywhere that matters now. If you want one format for photographs and do not want to think about fallbacks, this is it. You can move an existing library across with the image converter, or bring the file size down without changing format using the image compressor.

JPEG remains correct in exactly one situation: something old or inflexible has to open the file and you cannot control what. Print shops, older enterprise software, and some email clients still qualify. It is not a bad format. It is just no longer the efficient one.

FormatBest forTypical size vs JPEGTransparency
AVIFPhotographs, gradients, dark scenes50 to 70 percentYes
WebPPhotographs, general web use65 to 75 percentYes
JPEGMaximum compatibilityBaselineNo
PNGScreenshots, flat colour, hard edgesOften largerYes
SVGLogos, icons, diagramsTiny, resolution independentYes

Screenshots, diagrams, and anything with text

This is where most people go wrong, and the mistake is always the same: saving a screenshot as a JPEG. Lossy compression works by smearing detail across neighbouring blocks of pixels, and text is nothing but hard edges. The result is the grey halo you have seen around lettering in a thousand badly saved screenshots, and it appears at quality settings that look perfect on a photograph.

Use PNG. Flat interface colour compresses extremely well losslessly, so a screenshot of a document is often smaller as a PNG than as a JPEG that also looks worse. WebP in lossless mode does the same job and usually beats PNG by another 20 percent, so it is the better choice when support is not a concern. Crop before you export, using the image cropper, because the cheapest compression is always fewer pixels.

The same logic covers charts, screenshots of code, pixel art, and scanned line drawings. If the image has large areas of identical colour and sharp boundaries between them, it wants a lossless format.

One quick test

Zoom to 100 percent and look at the edge of a letter or a line. If it is crisp against its background, you need lossless. If everything in the frame fades gradually into everything else, lossy is safe.

Logos and icons want SVG

An SVG is not a grid of pixels at all. It is a set of instructions describing shapes, so it renders perfectly at any size, from a favicon to a billboard, from one small file. For a logo, an icon, or a simple diagram, nothing else comes close.

It has real limits. It cannot represent a photograph in any sensible way, complex illustrations can produce files far larger than a PNG of the same drawing, and because it is code rather than pixels, an SVG from an untrusted source can contain scripts. Strip anything you did not make yourself before putting it on a page.

If you have been handed a logo as a PNG and need it larger, converting will not help: the shape information is already gone. It has to be redrawn, or you have to go back and ask for the original vector.

A workflow that holds up

Keep one lossless master of anything you might edit again, and treat every published file as disposable output you can regenerate. This single habit prevents the slow generational decay that ruins image libraries over years.

Resize before you compress. An image displayed 800 pixels wide gains nothing from being 4000 pixels wide, and no amount of clever compression beats simply not sending the extra pixels. Get the dimensions right with the image resizer first, then compress.

Strip metadata on anything public. Camera files carry the make and model, the settings, timestamps, and often GPS coordinates from where the photo was taken. It is a small privacy leak attached to every holiday photo, and removing it makes the file smaller too.

Then check the result at the size it will actually be seen. Comparing images at 400 percent zoom will make you compress far more conservatively than you need to, and the extra weight buys nothing a real viewer will ever perceive.

The whole thing, compressed

Photographs get AVIF, or WebP when you want one format that works everywhere without thinking about it. Screenshots, diagrams, and anything containing text get PNG or lossless WebP. Logos and icons get SVG. JPEG is for when something else has decided for you.

Everything above holds regardless of which tool you use. The formats behave the way they behave because of what they discard, and once you know what your image is made of, the decision stops being interesting, which is the goal.

Tools from this guide

Keep reading