If your Largest Contentful Paint is bad and you convert every image on the site to WebP, there is a good chance nothing measurable happens. Format conversion shrinks bytes. LCP is mostly not a bytes problem. Google’s own breakdown of a healthy LCP puts roughly 40% in time to first byte and roughly 40% in downloading the LCP resource, with resource load delay — the gap between the server responding and the browser starting the image — supposed to be under 10%. On most WordPress sites that gap is the broken part, and no amount of re-encoding fixes it.
So the short version: fix discovery and sizing first, then convert formats. In that order, image work is one of the cheapest wins on a WordPress site. In the reverse order it is a weekend spent re-encoding a media library for a PageSpeed audit line item that was never the bottleneck.
Below is what actually moves LCP, what WebP and AVIF are each worth in real bytes, and where WordPress core already does the job for you.
What actually moves LCP on a WordPress page
Google splits LCP into four parts that add up to the whole: time to first byte, resource load delay, resource load duration, and element render delay. The targets are roughly 40% / under 10% / roughly 40% / under 10%. Image optimization only touches the third one. Here is where the other three go wrong on WordPress, in the order worth checking:
- The hero image is lazy-loaded. This is still the single most common LCP defect we see.
loading="lazy"tells the browser to wait until layout confirms the image is in the viewport, which guarantees load delay. Google’s guidance is blunt: never lazy-load your LCP image. - The hero image is not in the initial HTML. If the image is a CSS background, injected by a slider’s JavaScript, or held in
data-srcby a lazy-load script, the browser’s preload scanner cannot see it while the HTML is still streaming. It gets discovered late no matter how small the file is. - The LCP image is on another origin. A hero served from a separate CDN hostname needs a fresh DNS lookup, TCP connection and TLS handshake before the first byte of the image arrives.
- TTFB is the real problem. If the server takes 1.4s to produce the HTML, the image never had a chance. That is a caching and hosting question, not an image question — we covered the measurement side of this in why your PageSpeed score is 95 and your site still feels slow.
Only after those are clean does the file size of the LCP image become the thing standing between you and a 2.5s LCP at the 75th percentile, which is Google’s “good” threshold. Above 4.0s is “poor”; in between is “needs improvement”.
What WordPress core already does (6.3 and later)
A lot of the advice circulating about WordPress image optimization predates core doing this work itself, so people install plugins to solve problems that were fixed in 2023.
Since WordPress 6.3, core adds fetchpriority="high" to the one image it judges most likely to be the LCP element, and the dev note puts the typical LCP improvement at 5–10%. The logic lives in wp_get_loading_optimization_attributes(). Two numbers in it are worth knowing:
- An image is only eligible for high priority if width × height is at least 50,000 pixels — so 300×200 qualifies, 200×200 does not. The
wp_min_priority_img_pixelsfilter changes that threshold. wp_omit_loading_attr_thresholddefaults to 3, meaning the first three qualifying images skiploading="lazy". It was raised from 1 in 6.3 to suit multi-column layouts.
Core never emits fetchpriority="high" and loading="lazy" on the same image — that combination is an anti-pattern, and if you set both manually core raises a warning. Critically, core never overrides attributes you have already set. That is the trap: a page builder, theme or lazy-load plugin that writes its own loading="lazy" onto the hero wins, and core’s heuristic silently steps aside. If your LCP image is lazy-loaded on a modern WordPress install, something in your stack is doing it on purpose.
If your hero is a custom header rather than a post thumbnail, pass 'fetchpriority' => 'high' in $attr before core’s function runs rather than skipping the call:
add_filter( 'get_header_image_tag_attributes', function ( $attr ) {
$attr['fetchpriority'] = 'high';
return $attr;
} );WordPress 6.7 added one more piece: lazy-loaded content images get sizes="auto" prepended, so the browser picks a srcset candidate based on the width the image actually renders at instead of assuming 100vw. That alone often saves more bytes than switching format, because the classic failure is a 1536px file being downloaded into a 700px content column.
Which brings us to the thing almost every “convert to WebP” guide skips.
Serving the wrong size costs more than serving the wrong format
Take a 2560px wide photo on a page whose content column is 720px. Converting it to WebP might save 30% of its bytes. Serving the 768px srcset candidate instead of the 1536px one saves around 75%. The two are not in the same league, and the second one is free — it is a sizes attribute, not a re-encode.
Practical checks, in order:
- Open the hero image in DevTools and compare intrinsic size against rendered size. More than ~2× on a 1x display means you are shipping pixels nobody sees.
- Check whether your theme or builder outputs a
sizesattribute at all. Many builders strip srcset entirely and hardcode the full-size URL. - Check what the registered image sizes actually are. A theme that only registers thumbnail/medium/large leaves the browser choosing between 300px and 1536px with nothing in between.
- Cap the upload dimension. There is rarely a reason for a 4000px original to exist in a blog post’s srcset.
If the images on your site are being served at two or three times the size they render at, that is a fixable audit finding rather than a redesign — send us the URL and we’ll tell you which images are oversized and by how much before you commit to a plugin or a migration.
WebP vs AVIF: what the bytes actually look like
Here are real numbers rather than the “AVIF is 50% smaller” claim that gets repeated without a source. Four real images from this site — three photographs and one flat UI graphic — each resized to 1200px wide and re-encoded on 17 November 2026 with Pillow 12.3 (libwebp / libavif), method=6 for WebP:
| Source image | Rendered px | JPEG q82 | WebP q82 | WebP q75 | AVIF q50 |
|---|---|---|---|---|---|
| Stock photograph, busy detail | 1200×681 | 143.0 KB | 112.1 KB | 85.9 KB | 57.1 KB |
| Photograph, moderate detail | 1000×665 | 84.9 KB | 51.6 KB | 37.8 KB | 28.2 KB |
| Header photograph | 959×719 | 48.1 KB | 29.2 KB | 22.7 KB | 15.3 KB |
| Flat graphic / illustration | 600×444 | 40.5 KB | 24.8 KB | 19.2 KB | 11.7 KB |
Two honest caveats. First, quality scales are not comparable between encoders — WebP q82 and AVIF q50 are not the same perceptual target, they are simply the settings most pipelines default to. Second, these are re-encodes of images that were already lossy JPEGs, which is what actually happens when you convert an existing media library, and it is a slightly worse case than encoding from an original.
The pattern holds anyway: WebP saves roughly 20–40% over a well-tuned JPEG, AVIF saves roughly 60–70%, and the gap widens on flat graphics and illustrations. AVIF’s advantage is real and it is large.
The cost is CPU. Encoding the same 1200×681 photograph in the same environment:
| Format | Size | Encode time | Decode time |
|---|---|---|---|
| JPEG q82 | 147.2 KB | 14.8 ms | 2.8 ms |
| WebP q82 | 112.1 KB | 160.6 ms | 10.3 ms |
| AVIF q50 | 57.1 KB | 598.4 ms | 8.0 ms |
AVIF encoding is roughly 40× slower than JPEG here. That does not matter for a blog post image. It matters a great deal if you are bulk-converting 40,000 WooCommerce product images on shared hosting, or regenerating sub-sizes on every upload in a busy store. Budget for it, or run the conversion as a queued background job rather than on upload.
Is AVIF safe to use yet?
As of the caniuse figures for October 2026: AVIF is at 96.71% global support, WebP at 97.32%. The remaining AVIF gaps are Safari and iOS below 16.4, Chrome below 85, Edge below 121, Firefox below 93, and Opera Mini, which does not support it at all.
Roughly 3% of visitors is small but not zero, and the failure mode is a broken image rather than a slower one. So AVIF is safe with a fallback, and reckless without one. Practically:
| Situation | Reasonable choice |
|---|---|
| Hero / LCP image on marketing pages | AVIF with WebP or JPEG fallback — biggest payoff, lowest volume to encode |
| Large WooCommerce catalogue | WebP as the baseline; AVIF only if encoding is queued, not on upload |
| Screenshots, UI, flat graphics | AVIF, or lossless WebP — this is where AVIF wins hardest |
| Logos, icons, line art | SVG. Neither format beats a vector here |
| Site with meaningful older-Safari traffic | WebP only; check your own analytics rather than assuming |
How WordPress handles WebP and AVIF uploads
Core supports uploading and displaying both. WordPress 6.5 added AVIF support, and AVIF images get the same responsive images, fetchpriority and lazy-loading treatment as any other format — provided your server’s image library (Imagick or LibGD) supports it. Check Tools → Site Health → Info → Media Handling and look for AVIF in the list of supported formats; if it is missing, that is a hosting conversation, not a plugin one.
What core does not do is convert anything for you. Uploads are stored as uploaded. There is no built-in browser negotiation and no <picture> element with a JPEG fallback in core yet. Conversion on upload is available through a filter:
add_filter( 'image_editor_output_format', function ( $formats ) {
$formats['image/jpeg'] = 'image/avif';
return $formats;
} );Core keeps the originally uploaded file for future edits and sub-size regeneration, and defaults AVIF output to lossy quality 82 (adjustable via wp_editor_set_quality). Converting an existing library is not something core does — that needs a plugin.
The plugin question nobody frames properly
Conversion plugins differ less in compression quality than in how they serve the converted file, and that choice is the one that interacts with your cache:
- Rewrite the HTML to a
<picture>element. One URL per format, cache-safe, works behind any CDN. Can break themes and builders that expect a plain<img>. - Serve the same URL with content negotiation (Accept header +
Vary: Accept). Clean markup, but your page cache and CDN must honourVaryor you will serve AVIF to a browser that cannot read it — or cache the JPEG for everybody and silently lose the whole benefit. - Rewrite image URLs to
.webpdirectly. Simplest and most cache-friendly, but you need a real fallback path for the browsers that do not support it.
If you run full-page caching, the negotiation approach is where things usually go wrong. We walked through how these caching layers interact in the LiteSpeed vs WP Rocket vs FastCGI benchmark, and the same Vary problem applies here.
A sane order of operations
- Find the actual LCP element in field data, not in a lab test. It is often not the image you assume.
- Make sure it is in the initial HTML, not lazy-loaded, and not behind a slider script.
- Confirm core’s
fetchpriority="high"is reaching it, and that nothing in your stack has pre-set conflicting attributes. - Fix sizing: registered image sizes, a correct
sizesattribute, and a sane upload cap. - Then convert formats — AVIF with a fallback for heroes and graphics, WebP as the safe baseline everywhere else.
- Re-measure in the field after 28 days. Lab scores move immediately; Core Web Vitals do not.
Steps 1 through 4 cost nothing but attention and usually account for most of the improvement. Step 5 is the part that gets written about, and it is the smallest lever of the five. For the measurement side of this, what Google actually measures in 2026 is worth reading alongside this, and if your LCP is bad enough that images were never the explanation, start with why WordPress sites take 8 seconds to load.
If you would rather not work through all six steps yourself: our speed audit identifies which of them is actually costing you, with the numbers attached, before anyone touches the media library. Tell us your URL and what your LCP looks like now and we will tell you whether format conversion is worth your time on that specific site.
