[00] Subset Sizes, User guide
WebP, AVIF and JPEG
Which image format to serve, how Subset Sizes Pro makes and delivers WebP and AVIF copies, and why the original is always kept.
This page compares JPEG, WebP and AVIF, covers how to choose quality settings and what happens to photo metadata, and explains how Subset Sizes Pro makes and serves modern formats.
The three formats
JPEG is thirty years old, works everywhere and is still good for photos. It has no transparency and no useful lossless mode.
WebP works in every current browser, including Safari since version 14 (2020). At the same perceived quality, it’s about 25–35% smaller than JPEG for photos. It supports transparency, so it can replace PNG too.
AVIF is smaller again, often 20–30% below WebP. It works in Chrome, Firefox, Edge and Safari 16.4 onwards. Its drawback is encoding time: AVIF is much slower to produce than WebP.
Turn on WebP and AVIF in Pro
- Go to Subset → Image Sizes → Formats.
- Tick Make AVIF copies, Make WebP copies or both. Both are on by default. If your server’s image library can’t write a format, the screen says so next to it.
- Choose a Delivery option (see below).
- Click Save formats.
Copies sit next to each image, named by adding the format to the file name: photo-300x200.jpg gets photo-300x200.jpg.avif and photo-300x200.jpg.webp. Browsers that support AVIF get AVIF, then WebP, then the original format.
Delivery
Picture element (recommended) wraps your images in a <picture> element that lists each format in turn. The browser uses the first one it supports:
<picture>
<source srcset="/uploads/2026/03/harbour.jpg.avif" type="image/avif" />
<source srcset="/uploads/2026/03/harbour.jpg.webp" type="image/webp" />
<img
src="/uploads/2026/03/harbour.jpg"
alt="Fishing boats at low tide"
width="1600"
height="1067"
/>
</picture>
Each URL always returns the same file, so this works behind any CDN. A format is listed only once every file in the image’s srcset has that copy. Missing copies are made in the background, so a page never points at a file that isn’t there yet. If your theme styles figure > img, you may need to widen the selector to figure img.
Same URLs, format chosen by the server keeps your markup as it is. The server reads the browser’s Accept header and sends the AVIF or WebP copy from the original URL. Use it when images appear where markup can’t change, such as CSS backgrounds or another plugin’s HTML. It needs the server rules in the developer reference, and every cache between your server and the browser must respect Vary: Accept. Many CDNs don’t, so only use this mode when you control that.
Why the original is always kept
The <img> at the end of a <picture> element matters. Browsers without AVIF or WebP support use it, and so do email clients when someone copies your post. It’s also what’s left if the converted files are ever deleted. Subset Sizes never replaces or deletes your original uploads. Deleting originals to save disk space is the one optimisation you can’t undo.
Choosing a quality setting
Quality numbers don’t compare across formats. WebP at 80 isn’t the same as JPEG at 80, and AVIF uses a different scale again. To choose a setting:
- Pick a typical photo from your site. One with a large flat area, like a sky, is the hardest test.
- Encode it at a few settings and look at the flat area at full size. Banding and blotches appear there first.
- Use the lowest setting where you can’t see a difference, then leave it.
For photos, most sites settle on WebP quality between the high 70s and mid 80s. Screenshots and line art compress badly in lossy formats. Serve them as PNG or lossless WebP.
In Pro, the Quality and sharpening table on the Formats tab sets a quality and a sharpening amount for each size the plugin creates. Leave quality empty to use the default. Sharpening runs from 0 to 100, and 20 to 40 suits most photos.
What happens to EXIF data
Camera files carry metadata such as exposure, lens and often GPS coordinates. Re-encoding either keeps or drops that metadata, so decide which you want.
What to read next
On-demand and lazy sizes covers how sizes are created when pages first ask for them, and how to clean up sizes you don’t use.