Images
JPEG vs PNG
JPEG for photographs, PNG for images needing transparency or hard edges. PNG files of photographs are typically several times larger for no visible benefit, and it is one of the most common causes of an unnecessarily heavy page.
Side by side
| Compared on | JPEG | PNG |
|---|---|---|
| Compression | Lossy | Lossless |
| Photographs | Ideal | Wasteful — often 3–5x larger |
| Transparency | No | Yes |
| Sharp edges and text | Artefacts | Clean |
| Screenshots | Poor — text goes fuzzy | Good |
| Modern replacement | AVIF or WebP | AVIF or WebP |
When JPEG is the right choice
- Photographs of any kind
- Large hero images where file size dominates
- Anything with gradients and no hard edges
When PNG is the right choice
- Logos and graphics needing a transparent background
- Screenshots containing text
- Diagrams and line art, where SVG is not an option
The mistake that costs the most
Exporting product photography as PNG because it looked cleaner in a design tool. On a catalogue page that decision can multiply image weight several times over, and the difference is invisible at the size the image is displayed.
What both should be by now
AVIF or WebP, with JPEG or PNG only as the final fallback in a picture element. The comparison still matters because it decides which fallback you generate, but neither should be the format actually served to a current browser.
How to tell which you have been given
Check the file size against the dimensions. A 1200-pixel photograph should be a few hundred kilobytes at most; if it is three megabytes it is almost certainly a PNG that should have been a JPEG, and converting it is a two-minute job with a visible result.
The verdict
Photographs JPEG, transparency PNG — but both as fallbacks beneath AVIF and WebP. If you are choosing between only these two in 2026, the bigger win is adding the modern formats above them.
If you want the full treatment
Image SEO: findable images that do not wreck your page speed covers this in about 3 minutes — free, ungated, written from client work.
Who wrote this comparison
Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan. Where a comparison involves something I sell, the page says so — and every comparison here has to name at least two situations where each side wins, because a comparison one option always wins is an advert with a table in it.