SEO

WebP and AVIF

Also called WebP, AVIF, next-gen image formats

Modern image formats that hold photos and graphics at smaller file sizes than JPEG and PNG, so pages load faster.

Quick facts: WebP and AVIF

Category
SEO
Also called
WebP, AVIF, next-gen image formats
Level
Beginner
Affects
Page weight, Largest Contentful Paint, mobile load times, image search
Where to see it
PageSpeed Insights, Lighthouse, browser developer tools, Squoosh, CMS or CDN image settings
In this article4
  1. How WebP and AVIF work
  2. Why it matters
  3. Common mistakes
  4. How to act on it

WebP and AVIF are modern image file formats that store photos and graphics at smaller file sizes than JPEG and PNG while looking much the same to the eye. Smaller images mean pages load faster, which helps visitors and supports good page speed scores.

How WebP and AVIF work

Both formats use more efficient compression than the formats they replace. WebP was released by Google in 2010 and handles lossy compression for photos, lossless compression for graphics, transparency and animation, so one format can stand in for JPEG, PNG and GIF. AVIF is newer, developed by the Alliance for Open Media from the AV1 video codec. For photographs it usually achieves smaller files again at the same visual quality, and it supports high dynamic range and wide colour, but it takes longer to encode.

All current major browsers display both formats. AVIF support arrived later, in Safari 16 in 2022 and in Edge at the start of 2024. For older devices, the HTML picture element lets you offer AVIF first, WebP second and JPEG as a fallback, with the browser choosing the first one it understands. Many content delivery networks can do the same automatically, converting images on the fly based on what each browser says it accepts.

WordPress has accepted WebP uploads since version 5.8 and AVIF since 6.5, provided the server’s image library supports them. Some hosts and plugins already convert uploads to WebP automatically, so check what your set-up does before adding another tool.

Why it matters

On most web pages, images make up a large share of the bytes downloaded, and the main hero image is often the element measured for Largest Contentful Paint. Cutting its size is one of the most direct ways to improve that metric. For visitors on a crowded commuter train or a rural 4G signal, the difference between a heavy JPEG and a well-compressed WebP is the difference between a page that appears and one they give up on.

Google Search indexes both formats, so switching does not cost you image search visibility, provided file names, alt text and surrounding content stay in place.

Common mistakes

  • Converting without resizing. A 4,000-pixel-wide photo shown at 800 pixels is still far too heavy, whatever its format. Format and dimensions are separate problems.
  • Squeezing quality too hard Which leaves blotchy skin tones and smeared detail on product photos, where accurate colour sells.
  • Recompressing already-compressed files again and again, which compounds the damage. Convert from the best original you have.
  • Using WebP in email newsletters Where some email clients still do not display it reliably.
  • Serving WebP as the social share image Which some platforms and messaging apps handle poorly. A JPEG is the safer choice for the image shown when a page is shared.
  • Applying lazy loading to the hero image after switching formats, which delays the very image the change was meant to speed up.

How to act on it

Run your key pages through PageSpeed Insights and look at the image delivery findings, which list images that could be smaller in a modern format or at a more suitable size. That shows you how much there is to gain before you change anything.

Then choose one pipeline and stick to it: conversion in the CMS, a plugin, or a CDN that converts automatically. Running two at once tends to produce double compression and confusing caches. Resize images to the largest size they are actually displayed at, use responsive srcset attributes so phones get smaller versions, and keep your original high-resolution files somewhere safe.

Format choice is one part of wider image optimisation, alongside dimensions, loading order and caching. Sorting out image delivery is a regular part of the technical SEO work I do on slow sites.

Do and do not

Do

  • Resize images to their displayed dimensions as well as converting them
  • Offer a JPEG or PNG fallback for important images
  • Keep a JPEG for the social share image

Do not

  • Recompress images that are already heavily compressed
  • Lazy load the main hero image
  • Run several conversion plugins or services at once

Questions people ask about this

Should I use WebP or AVIF?

For most sites, WebP is the simpler default: it is widely supported, quick to encode and well handled by plugins and CMSs. AVIF usually produces smaller photographs, so it is worth adding where images are large and numerous, such as an online shop, ideally served through a picture element or CDN with WebP or JPEG as a fallback.

Will converting my images to WebP improve my Google rankings?

Not directly. Faster loading supports a better page experience and Core Web Vitals, which Google takes into account, but the effect on rankings is usually small compared with content and relevance. The more reliable gain is that visitors see the page sooner and are less likely to leave.

Do all browsers support WebP and AVIF?

All current versions of the major browsers support both, including Chrome, Edge, Firefox and Safari. Very old devices and some email clients do not, which is why a JPEG or PNG fallback through the picture element remains good practice for important images.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.