Images are usually the heaviest thing on a web page, which makes the format you choose one of the few decisions that affects load time, Core Web Vitals and bounce rate all at once. For photographic content in 2026 there are three practical options: JPEG, WebP and AVIF.
The summary is simple — AVIF is smallest, WebP is the safest default, JPEG is for compatibility — but the interesting part is where each one breaks that rule, and there are real cases where the newest codec is the wrong answer.
JPEG: the compatibility floor
JPEG is thirty years old, supported by literally everything, and encodes almost instantly. Its compression is dated: at equivalent visual quality it produces the largest files of the three, and it degrades in a characteristic way — blocky 8×8 artefacts in flat areas and coloured fringing around hard edges.
It has no transparency and no animation. Where it still wins is predictability: there is no device, no decade-old browser and no government upload portal that will refuse a JPEG, which is exactly why some of them demand one.
WebP: the sensible default
WebP typically lands 25–35% smaller than JPEG at comparable quality, supports an alpha channel (so it replaces PNG for transparency) and supports animation (so it replaces GIF, at a fraction of the size). Support is universal across current browsers.
That combination is why it is the right default for most websites: meaningful savings, one format covering photographs, transparent graphics and animation, and no fallback to maintain. Encoding is fast enough to run in a browser without anyone noticing.
AVIF: the smallest files
AVIF is built on the AV1 video codec and is the most efficient of the three by a wide margin — commonly 50% smaller than JPEG at the same perceived quality, and sometimes better than that on images with large areas of flat colour or smooth gradient, where JPEG struggles most visibly.
It also handles wide colour gamut and high dynamic range properly, which the others do not, and supports transparency and animation. Browser support is now broad, though a little behind WebP.
The cost is encoding time. AVIF is computationally expensive to produce — noticeably slower than WebP for the same image, which matters for a large batch or for anything encoded on the fly.
What to actually use
Translating the above into decisions, by situation rather than by codec.
- A normal website, one format, minimal effort: WebP. Near-universal support, large savings, covers transparency and animation.
- A performance-critical site where you can serve alternatives: AVIF with a WebP fallback via `<picture>`. This is the smallest-bytes answer.
- Government or legacy portal uploads: whatever they specify, which is usually JPEG at a stated KB cap. Do not be clever here.
- Logos, icons, diagrams, anything with text in it: SVG if you have the vector, PNG if you do not. These are not photographs and lossy codecs blur their edges.
- Screenshots of UI and text: PNG or lossless WebP. Lossy compression on small text is immediately visible.
- Archival masters: keep the original camera file. Every re-encode is a one-way loss.
Resolution beats codec
The most common real-world mistake is not choosing the wrong codec — it is serving a 4000px-wide photograph into a slot 800px wide and then arguing about AVIF versus WebP. Resizing that image to the dimensions it is actually displayed at saves far more bytes than any codec change will.
Get the order right: crop to the content, resize to the display dimensions (times two for high-density screens at most), then choose a format, then compress. A correctly sized JPEG beats an oversized AVIF every time.
Measure, do not guess
Compression efficiency varies enormously by image content. A portrait with smooth skin tones, a screenshot of a spreadsheet and a photograph of foliage respond completely differently to the same codec at the same quality setting, so published averages are a starting point rather than an answer.
Farvixo's Image Compressor has a Compare Codecs view that encodes your specific image in each format and shows the exact resulting size alongside a side-by-side preview. For a hero image you are going to serve a million times, spending thirty seconds on that comparison is worth more than any rule of thumb.
Everything runs in your browser — batch a whole folder, set a target file size or a social-media preset, and download without uploading your photographs anywhere.
Quality settings that hold up
Treat these as starting points to check against your own images rather than as fixed values, since the quality scales are not comparable between codecs.
- JPEG: quality 75–85 for photographs. Above 90 the file grows fast for differences nobody sees.
- WebP: quality 75–82 lossy for photographs; lossless for screenshots and graphics with text.
- AVIF: roughly quality 50–65 looks comparable to JPEG 80 — the number is lower because the scale is different, not because the quality is.
- Never re-compress an already-compressed image. Always encode from the highest-quality source you have.
Frequently asked questions
Is AVIF better than WebP?
Smaller, yes — commonly 20–30% smaller than WebP at matched quality, and noticeably better on gradients and flat colour. But it encodes much more slowly and its browser support is slightly narrower. WebP remains the better default for most sites; AVIF is worth it when bytes are critical and you can serve a fallback.
Should I still use JPEG in 2026?
Only where something requires it — most commonly government and job portals that specify JPEG at a given KB limit. For the open web, WebP or AVIF produce smaller files at the same quality with no practical compatibility cost.
What about PNG?
PNG is lossless, so it is right for screenshots, logos, diagrams and anything containing text or hard edges — but it is a poor choice for photographs, where it produces very large files. For transparency on the web, lossless WebP does the same job much smaller.
How much can I compress an image before it looks bad?
It depends entirely on the content: smooth gradients and skin tones show artefacts early, busy textures like foliage hide them well. Rather than trusting a number, compress at a couple of settings and compare at 100% zoom on the actual image.
Does image format affect SEO?
Indirectly, through page speed. Smaller images improve LCP, which is a Core Web Vitals metric and a real if modest ranking signal. Correctly sizing images, setting explicit width and height to avoid layout shift, and lazy-loading below the fold all matter at least as much as the codec.
Are my images uploaded when I compress them?
No. The Image Compressor encodes in your browser, so photographs stay on your device. That also means you can compress a large batch without waiting on an upload.