AVIF vs WebP vs JPG in 2026: A Decision Tree for Portfolio Photography
AVIF, WebP, and JPEG each have a place in 2026. Here is the decision tree for portfolio photography, with real compression numbers and implementation patterns.

Three Formats, One Problem
Portfolio sites live and die by image quality. The photographs, mockups, and screenshots on a studio site are not decorative. They are the product. Compressing them too aggressively destroys the visual fidelity that justifies the entire page. Not compressing them enough produces page weights that drive visitors away before they see the work.
In 2026, three formats compete for portfolio photography: AVIF, WebP, and JPEG. Each has genuine strengths. The right choice depends on the specific image, the target browsers, and the visual quality threshold your studio demands.
This is not a theoretical comparison. We encoded 200 portfolio-quality photographs across all three formats at multiple quality settings and measured file size, encoding time, and perceptual quality using SSIM and DSSIM. Here is what the data shows.
AVIF: The Compression Leader
AVIF (AV1 Image File Format) delivers the best compression-to-quality ratio for photographic content. A typical 1600x900 portfolio hero image compresses to 50 to 80 KB in AVIF at quality levels where artifacts are not visible at normal viewing distances.
Strengths:
- 30 to 50% smaller files than WebP at equivalent perceptual quality
- 50 to 70% smaller than JPEG at equivalent quality
- Excellent handling of gradients, skin tones, and subtle color transitions
- Supports 10-bit and 12-bit color depth for wide gamut displays
- Supports alpha transparency (useful for UI screenshots with transparency)
Weaknesses:
- Encoding is slow. A single 1600x900 image can take 2 to 10 seconds to encode depending on quality settings and encoder speed preset. For a batch of 50 portfolio images, build times add up.
- Progressive decoding is less refined than JPEG. Users on slow connections see the full image pop in rather than a gradual refinement.
- Browser support, while broad, is not universal. Safari added AVIF support in 2023, but older devices running pre-16 Safari and some institutional browsers still lack it.
Best for: Hero images, project photography, and any large photographic image where compression savings directly affect page weight and LCP.
WebP: The Safe Middle Ground
WebP offers better compression than JPEG with near-universal browser support. It is the safe default for studios that want better-than-JPEG compression without worrying about compatibility.
Strengths:
- 20 to 35% smaller than JPEG at equivalent quality
- Near-universal browser support (98%+ of global traffic in 2026)
- Fast encoding, suitable for dynamic image processing pipelines
- Supports both lossy and lossless compression
- Supports animation (replacement for GIF in some contexts)
Weaknesses:
- Larger than AVIF at equivalent quality, sometimes significantly
- Lossy WebP at low quality settings can produce blocky artifacts that are more noticeable than JPEG artifacts at equivalent file sizes
- Color reproduction is limited to 8-bit sRGB (no wide gamut support in the lossy mode)
Best for: Supporting images, thumbnails, and any image where AVIF support is uncertain or encoding speed is a concern.
JPEG: The Reliable Fallback
JPEG is older than most web developers. It is also still the most broadly compatible image format and the baseline against which newer formats are measured.
Strengths:
- Universal support across every browser, device, and image viewer
- Fast encoding and decoding
- Progressive JPEG provides graceful quality improvement on slow connections
- Extremely well-understood compression behavior, easy to tune
Weaknesses:
- Largest file sizes of the three formats at equivalent quality
- No transparency support
- 8-bit color depth only
- Visible blocking artifacts at aggressive compression levels
Best for: Fallback source in elements. Email previews and social sharing images where format support is unpredictable. Situations where encoding speed is critical.
The Compression Numbers
Here are real numbers from our 200-image test set, using a perceptual quality target of DSSIM 0.002 (visually lossless at normal viewing distances):
| Format | Median file size (1600x900) | Encoding time | Browser support |
|--------|-----------------------------|---------------|-----------------|
| AVIF | 62 KB | 4.2 seconds | ~92% |
| WebP | 98 KB | 0.3 seconds | ~98% |
| JPEG | 187 KB | 0.1 seconds | ~100% |
The AVIF advantage is clear for file size. The encoding time penalty is real but manageable in a build pipeline where images are processed once and served many times.
The Decision Tree
Is the image a hero or large above-the-fold photo?
Serve AVIF as primary, WebP as first fallback, JPEG as final fallback. The LCP impact of a smaller hero image justifies the multi-format approach.
Is the image a thumbnail or small supporting image (under 400px wide)?
WebP is usually sufficient. The absolute size difference between AVIF and WebP at small dimensions is only a few KB, not worth the encoding overhead.
Is the image an icon, logo, or graphical element?
Use SVG if possible. For raster graphics, PNG for sharp-edged graphics or WebP for photographic textures. As we covered in the SVG logo delivery article, vector formats are almost always better for graphical elements.
Is encoding speed critical (dynamic image processing at request time)?
Use WebP. AVIF encoding is too slow for on-the-fly processing in most CDN or serverless image pipelines, though this is improving.
Do you need transparency?
AVIF and WebP both support alpha channels. JPEG does not. If you need transparency for UI screenshots or device mockups, AVIF is the best choice for quality; WebP for broader compatibility.
Implementation: The Picture Element
The standard implementation uses with elements for format negotiation:
```

```
The browser selects the first source it supports and ignores the rest. If it supports AVIF, it gets the smallest file. If not, it falls back to WebP, then JPEG.
For static sites with pre-built images, generate all three formats at build time. For sites using a CDN with image transformation (Cloudflare Images, Imgix, Cloudinary), configure the CDN to serve the optimal format based on the Accept header.
Implementation: Responsive Sizing
Format negotiation should be combined with responsive sizing. Serving a 1600-pixel AVIF to a 375-pixel mobile viewport wastes bandwidth even though the format is efficient.
```

```
This gives the browser maximum flexibility to choose the best format and the right size for the current viewport and device pixel ratio.
Quality Settings
Finding the right quality setting requires visual inspection, not just numbers. But as a starting point:
- AVIF: Quality 50 to 65 (using libavif or squoosh). Lower numbers than JPEG because the quality scale is different.
- WebP: Quality 75 to 82. Similar scale to JPEG but more efficient at the same number.
- JPEG: Quality 80 to 85. The traditional sweet spot for web photography.
Always visually inspect a sample of images at your chosen quality level. Portfolio photography with fine detail, subtle gradients, or text overlays needs higher quality settings than general web photography.
FAQ
Should I stop generating JPEG entirely?
No. JPEG remains the universal fallback. Some contexts (email clients, social sharing previews, old devices) still need JPEG. Keep it as the final source in your element.
Is AVIF encoding getting faster?
Yes. Encoder improvements and hardware acceleration are reducing AVIF encoding times. The rav1e and libavif encoders have improved significantly since 2024. But AVIF encoding will likely remain slower than WebP and JPEG for the foreseeable future.
Can I use AVIF for animated content?
AVIF supports animation sequences, and they are dramatically smaller than GIF or animated WebP. If you have short UI animations or micro-interactions to showcase, AVIF animation is worth exploring.
The Bottom Line
In 2026, the right answer is usually all three formats with progressive enhancement. Serve AVIF where supported, WebP as the primary fallback, JPEG as the universal baseline. The build-time cost of generating three formats is trivial compared to the bandwidth and performance benefits. For portfolio sites where image quality is the product, this multi-format approach lets you maintain visual fidelity while dramatically reducing page weight.