JPG, PNG, WebP or AVIF — which image format should you use?
There are dozens of image formats, and four of them cover almost every real job.
JPG — photographs going anywhere
Small, universal, lossy. Right for photos sent by email or message, uploaded to a shop, or printed. Wrong for screenshots, logos and anything with sharp text, where the compression leaves smudges. Keep quality at 85–92%.
PNG — screenshots, logos, transparency
Lossless and supports transparent backgrounds. Files are bigger than JPG for photos, but perfect for anything with flat colour, text or a cut-out background.
WebP — the web, when you control the site
About 30% smaller than JPG at the same quality, supports transparency, and every current browser opens it. Wrong for sending to people: many desktop apps still cannot open a WebP, which is why “WebP to PNG” is one of the most common conversions there is.
AVIF — smallest of all, least compatible
Roughly half the size of JPG. Browsers display it, but most other software does not yet. Use it for websites you build; convert it to JPG or PNG for anything else.
A quick rule
- Photo to a person → JPG
- Screenshot, logo or transparent image → PNG
- Image on a website you run → WebP (or AVIF)
- Anything you received that will not open → PNG
JPG: the safe default for photographs
Lossy, 8 bits per channel, no transparency, and understood by literally everything. It compresses photographs well because its maths assumes smooth gradients and gentle detail, which is what photographs are made of. It handles hard edges badly, which is why text and screenshots saved as JPG look fuzzy and develop grey smudges around the letters. Every save is another generation of loss, so edit from an original and export to JPG once, at the end.
PNG: lossless, and the one with real transparency
Every pixel comes back exactly as it went in, and the alpha channel gives you genuine partial transparency rather than one colour knocked out. That makes it right for logos, icons, diagrams, screenshots, anything with text in it, and any image you are going to keep editing. The cost is size: a photograph as PNG is routinely five to ten times larger than the same photograph as JPG, for a difference nobody can see.
WebP: smaller than both, and safe on the web now
WebP does lossy and lossless in one format, supports transparency in both modes, and typically lands 25–35% below the equivalent JPG or PNG. Every current browser supports it. The catch is outside the browser: plenty of desktop software, older phones, print workflows and upload forms still reject it, so it is a great format to serve and a poor format to send someone.
AVIF: the smallest, with the newest support
AVIF uses the still-image side of the AV1 video codec. It beats WebP again on size, often substantially, and adds 10- and 12-bit colour, HDR and good transparency. Browser support is broad now. Support in ordinary applications is patchier than WebP's, and encoding is slower. Use it for images on a site you control, where the saving is worth it and a fallback is easy.
What about transparency?
PNG, WebP and AVIF all have a real alpha channel. JPG has none at all, so anything transparent has to be flattened onto a solid colour when you convert — white, unless you pick another. GIF has one-bit transparency, meaning a pixel is either fully there or fully gone, which is why GIF logos so often have a ragged fringe.
What about animation?
GIF animates and is accepted everywhere, but it is limited to 256 colours per frame and the files are enormous. WebP and AVIF both animate at a fraction of the size with full colour. For anything longer than a couple of seconds, an actual video — MP4 or WebM — is smaller again by an order of magnitude and is what most sites quietly use behind what looks like a GIF.
A short decision list
A photograph for someone else, or for anything you do not control: JPG. A logo, icon, screenshot, or anything with text or transparency: PNG. Images on a website you run: WebP, or AVIF if you can. An original you will keep editing: PNG, or the camera's own raw file. A short loop: WebP if the destination allows it, GIF if it must work everywhere, MP4 if it is longer than a moment.
