Skip to content

Image formats (WebP, AVIF)

WebP and AVIF are image formats for the web. They store a photo in a much smaller file than JPEG at the same visible quality. Whether WordPress can create images in these formats depends on the image library on your server.

Images are often the largest files on a page, and the largest image is often what Largest Contentful Paint measures. A smaller file arrives sooner, especially on a phone with a slow connection.

When you upload an image, WordPress creates smaller copies of it for thumbnails and the sizes your theme needs. It saves those copies in the format of the upload. If the server’s image library can’t handle WebP, uploading a WebP image ends with an error, and plugins that convert JPEG uploads to WebP can’t do their work either. Without AVIF support, the same applies to AVIF.

Server: WordPress uses one of two image libraries in PHP, Imagick or GD. Which formats they can write depends on how the hosting provider built them. The most common reason for missing WebP or AVIF is an older library version on the server; AVIF support in particular is often missing.

WordPress: WordPress handles WebP uploads since version 5.8 and AVIF uploads since version 6.5 (sources below). Plugins can decide which format WordPress uses for the smaller copies.

The Image formats card is in System info, tab Server & System, under PHP. Permo asks WordPress whether an image library on this server can write WebP and AVIF, the same check WordPress itself makes before it creates an image.

  • WebP · AVIF or WebP in green: WordPress can create WebP images, and AVIF too if listed.
  • No WebP in yellow, with the note Smaller images need WebP.

If WordPress can’t answer, the card shows a dash and Can’t be read on this server.

Sources