Here is the rule that settles most of it:
Photographs go in a lossy format. Graphics with flat colour and sharp edges go in a lossless one.
Everything below is the detail behind that sentence, plus the handful of cases where it is not enough.
| Format | Best for | Transparency | The catch |
|---|---|---|---|
| WebP | Almost everything on a website | Yes | Some desktop software still refuses it |
| JPG | Photos going anywhere unpredictable | No | Degrades slightly on every save |
| PNG | Logos, icons, screenshots of text | Yes | Enormous for photographs |
Why the photo-versus-graphic split matters so much
The two families of format compress in completely different ways, and each one is terrible at the other's job.
Lossy formats — JPG and standard WebP — throw information away. They exploit the fact that human eyes barely notice small changes in a busy, noisy area like foliage or skin texture. On a photograph this works beautifully: you discard most of the data and nobody can tell.
Lossless formats — PNG — find repetition and encode it compactly. A logo that is 60% identical white pixels compresses enormously, and the result is bit-for-bit identical to the original.
Now swap them. Run a photograph through PNG and there is almost no repetition to find, so you get a faithful copy at several times the size of the JPG. Run a screenshot of text through JPG and the lossy algorithm, built for noisy areas, smears the sharp black-on-white edges into grey mush and puts a visible halo around every letter.
That halo has a name — ringing, or mosquito noise — and once you have seen it on a screenshot you will notice it on half the images on the internet.
WebP, and why it is usually the answer
WebP does both jobs. It has a lossy mode that beats JPG by roughly 25–35% at equivalent visual quality, and a lossless mode that beats PNG. It supports transparency in both modes, which PNG can do and JPG cannot, and it handles animation, which covers most of what GIF was used for at a fraction of the size.
Browser support stopped being a real concern years ago. Every current browser reads it.
Where it falls short: outside the browser. Some older desktop applications, some print workflows and the occasional upload form will reject a .webp outright. If the file is going somewhere you do not control, JPG remains the format that always works. That is genuinely WebP's only serious weakness, and it has nothing to do with the format's quality.
The transparency trap
This catches people constantly. JPG cannot store transparency. There is no alpha channel in the format — it simply does not exist.
So when you convert a transparent PNG logo to JPG, something has to fill those pixels. Good converters ask you what colour. Bad ones pick for you, and a surprising number pick black, which is how you end up with a logo that looked perfect in the preview and appears in a black box on the page.
If you need transparency, your options are PNG or WebP. If you are converting to JPG anyway, check what is filling the background before you ship it — the converter here lets you set that colour explicitly rather than guessing on your behalf.
Converting the other way recovers nothing
Turning a heavily compressed JPG into a PNG does not restore detail. The information was destroyed when the JPG was first saved and there is nothing left to bring back — you have made a large, lossless, perfectly faithful copy of a damaged file.
The practical rule: convert once, from the best original you have. Every lossy re-save compounds. If you made a WebP and now need a JPG, go back to the original rather than converting the WebP.
So which one, concretely
- Photo on a website → WebP. JPG if it also has to work off the web.
- Logo, icon, or anything needing transparency → PNG for maximum compatibility, WebP if it is web-only and you want it smaller.
- Screenshot containing text → PNG. This is the case people get wrong most often, and JPG visibly wrecks it.
- Emailing a photo to someone → JPG. Never make a person fight your file format.
- Printing → whatever the printer asks for, usually a high-quality JPG or a TIFF. Not WebP.
What about AVIF, and GIF?
AVIF compresses better than WebP — often meaningfully so — and browser support is now broad. It is a reasonable choice if you are serving multiple formats and can fall back. Encoding is slower, and support in software outside the browser lags further behind WebP's, so it is not yet the safe default.
GIF should be retired for everything except the cultural convention of calling short looping videos "gifs". It is limited to 256 colours and produces files many times larger than the equivalent WebP or MP4. If you are choosing GIF for a still image, you want PNG. If you are choosing it for animation, you want WebP or a video file.
Once you have picked the format, the actual swap takes a few seconds in the image converter — and if you are going to JPG it asks you which colour to put behind the transparent pixels rather than silently choosing black. Everything runs in your browser, so nothing gets uploaded.
Format is only half the file-size problem, though, and usually the smaller half. The bigger one is that most images have four times more pixels than they will ever display, which is what reducing image file size is about — worth reading before you conclude the format was the issue.
Frequently asked questions
Is WebP better than JPG?
For anything on a website, yes — typically 25–35% smaller at the same visual quality, plus transparency support. JPG remains better for files leaving the web, since some desktop software and upload forms still reject WebP.
When should I use PNG instead of JPG?
When the image has flat colour and sharp edges: logos, icons, diagrams, and especially screenshots containing text. JPG smears those edges and adds visible halos. Never use PNG for photographs — the file will be several times larger with no benefit.
Why does my PNG turn black when I convert it to JPG?
JPG has no transparency channel, so the transparent pixels must be filled with something. Some converters default to black. Use a tool that lets you choose the fill colour, which is almost always white.
Does converting JPG to PNG improve quality?
No. The detail was discarded when the JPG was created and cannot be recovered. You get a lossless copy of a lossy image, usually several times larger. Convert once, from the highest-quality original you have.
Should I use AVIF instead of WebP?
AVIF compresses better and browser support is now broad, so it is a good choice if you serve multiple formats with a fallback. Encoding is slower and non-browser software support lags, so WebP is still the safer single default.
Is GIF still worth using?
Only for compatibility with something that demands it. GIF is capped at 256 colours and produces files many times larger than an equivalent WebP or MP4. For still images use PNG; for animation use WebP or video.
Last updated September 19, 2026