Use the smallest visually acceptable format that works through your actual publishing journey. Retain originals and a tested rollback path; do not migrate the whole library from a single successful upload.

AVIF can be a good choice for a WordPress image, and WebP can be a good choice too. The useful comparison is the complete publishing journey: can your site upload the file, generate the sizes it needs, deliver the correct version, display it clearly and preserve a working preview when the page is shared?
Do not choose solely from the smallest original file. An image that saves bytes but loses readable text, fails to generate a card thumbnail or breaks a social preview is not an improvement for that job. Use a small, representative test set before changing your library-wide defaults.
Separate format support from workflow support
WordPress added core AVIF support in version 6.5. Its traditional server-side processing path depends on support in the configured image library. The fact that a visitor’s browser can display AVIF does not establish that your host can resize it.
The newer WordPress 7.1 client-side media developer note describes an additional path in compatible browsers, with fallback to server processing when necessary. That changes the diagnosis: check the installed version and active processing path instead of repeating that every successful AVIF upload proves server-side support. Plugins that process metadata or synchronize files also need verification.
Record WordPress version, authoring browser, image-optimization plugin, CDN and the media-handling information available in Site Health. These are separate parts of the chain. A change to any one can explain why an image worked last month and behaves differently today.
Build a representative image set
Select actual types of content your site publishes, with permission to use them. For an editorial website, a useful set includes a photograph with gradients, a screenshot containing small interface text, a flat illustration and a logo with transparency. Keep the original files unchanged.
The MDN format guide explains the different characteristics of common web formats. Rather than treating a format’s reputation as a result, compare the appearance and delivery of your own exports. Compression settings are not necessarily comparable numerically across encoders or formats.
Export candidate files at the same pixel dimensions and compare them at the size readers will see. Inspect edges, fine text, gradients, transparent backgrounds and areas around the logo. Then examine the full-size version to understand what was discarded. The winning export may differ between a photograph and a diagram.
Use visible quality as a constraint
Decide what must remain legible before measuring savings. A screenshot that explains a setting needs clear labels. A branded illustration should retain the official mark’s shape and clear space. A photograph may tolerate compression artifacts that would be unacceptable in a price table.
Do not stretch logos to fit a preferred aspect ratio or recolor them to disguise poor contrast. Use an appropriate background and a container that preserves the artwork. If an article card crops an image with object-fit: cover, place essential artwork in a tested safe area or use a composition intended for that crop.
Record file size only after the candidate passes the visual check. A 40 KB image is not automatically better than an 80 KB image if the smaller one makes the article harder to understand. Your acceptance criterion should combine clarity, correct dimensions and reasonable transfer size.
Test a fresh upload and its generated sizes
Work in staging, or use a small approved test attachment on the real site without changing existing published images. Upload each candidate through the same editor the publishing team normally uses. A command-line conversion alone does not test that workflow.
- Confirm the upload completes and the Media Library shows a usable thumbnail.
- Check that the original or retained source remains available as intended.
- Inspect the generated sizes your theme actually requests.
- Place the attachment in an article, a library card and any relevant featured-image position.
- Save and reload the editor, then inspect the anonymous public page.
- If more than one authoring browser is used, repeat the upload in each supported path.
A successful original image request is insufficient if the card uses a missing smaller file. Conversely, a working thumbnail does not prove the full article hero or downloadable original is correct. Inspect those URLs separately and record which size each component selects.
Inspect responsive delivery in the browser
At a narrow mobile width and a desktop width, inspect the displayed image and the selected source. Confirm that the browser is not downloading a huge original for a small card when an appropriate responsive size should be available. Also check the high-density screen case if it matters for your audience.
Look at the actual response content type and decoded image rather than trusting the filename extension. An optimization layer may negotiate formats or use a different underlying file while preserving a familiar URL. That can be legitimate, but it means the URL alone is not your result.
If the page is slow, separate image transfer from other causes. An enormous background image, an oversized layout, delayed discovery or a blocking script can dominate the experience even after a format change. Use a repeatable page and network condition before attributing improvement to AVIF or WebP.
Check the CDN and cache variants
When a CDN or plugin serves different representations, verify that each supported request receives a compatible image. Test the public hostname with the cache warm and after a controlled purge of only the test asset, if your system requires it.
Do not add negotiation rules from an unrelated tutorial to a live server just to make a file extension look modern. The cache must distinguish variants appropriately, and the origin must retain a valid fallback where one is promised. A misconfigured cache can serve one visitor’s negotiated format to a different client.
Also test CSS background images, gallery lightboxes and content generated outside the normal WordPress image block. They may not use the same markup or optimization path as an article hero. Treat each as a separate consumer rather than assuming an image plugin covers everything.
Use explicit fallback markup where your implementation needs it
The picture element can offer alternative typed sources while keeping an img fallback. The simplified example below is illustrative; do not paste it over WordPress’s existing responsive markup without integrating its size and attachment handling:
<picture>
<source srcset="cover.avif" type="image/avif">
<source srcset="cover.webp" type="image/webp">
<img src="cover.jpg" width="1200" height="800"
alt="Diagram showing the three stages of the publishing workflow">
</picture>
In a real theme, each source may need responsive candidates and accurate sizes. The alt text should explain the image’s useful content, not list formats or repeat keywords. Width and height help reserve the expected space, but the final component still needs a responsive layout.
Test social sharing as a separate journey
A social-preview service is not the same consumer as a visitor’s browser. Inspect the page’s actual Open Graph and other sharing metadata, identify the declared image URL and use the relevant platform’s preview tool where available.
If a preview consumer does not accept your chosen format or cached a failed request, a separate supported sharing image may be appropriate. A JPEG or PNG fallback can be practical for that role, but verify the platform’s current requirements rather than assuming a universal restriction. Keep the sharing composition and article cover recognizably related.
Check anonymous access to the declared URL, redirects, dimensions and response type. A correct-looking editor preview does not prove the public metadata points to the same image. Do not regenerate the entire library to fix a single stale sharing tag.
Renaming a .jpg file to .avif does not convert its contents. Keep a genuine export or conversion step in the workflow and verify the resulting file can be decoded. If the extension, response type and displayed result disagree, investigate that mismatch before adding the asset to an automated publishing pipeline.
Expand gradually and preserve rollback
Once the small set passes, apply the chosen approach to a limited group of new articles. Retain the original attachments and a mapping from each article to its previous featured image. Avoid deleting source files until backup restoration and all dependent uses have been checked.
If you later regenerate thumbnails or change output-format defaults, take a backup and test in staging first. Confirm the disk and processing budget, the behavior of old URLs, and whether existing content references files directly. Bulk image work can affect more than the visible homepage.
Your final decision may be AVIF for selected photographs, WebP for other editorial artwork and an established fallback for a particular external consumer. That is a coherent result. Choose the format that survives the whole journey with clear content and manageable maintenance, rather than forcing every image into one answer.
Sources and verification
Editorial review 2026-10-14. Source check dates are recorded separately. Notes describe what each source supports and its limits.
View sources
- WordPress 6.5 adds AVIF supportChecked WordPress added core AVIF support in 6.5; the traditional server processing path depends on the image library's support.
Limits: A historical core note does not establish the reader's current server, plugin or browser capabilities. - Client-Side Media Processing in WordPress 7.1Checked The documented newer client-side path can process media in a compatible browser, with server fallback and plugin-hook considerations.
Limits: Version-specific developer guidance. Do not assume this path is active on every WordPress installation or browser. - MDN image file type and format guideChecked Image formats have different compression, transparency and compatibility characteristics; format choice depends on the use case.
Limits: General web guidance, not a benchmark of a particular image, WordPress site or CDN. - MDN picture element referenceChecked The picture element can offer typed sources with an img fallback for browser selection.
Limits: Browser source selection does not prove that every external social-preview consumer supports the same formats.