Can I safely use AVIF or WebP share images?

AVIF and WebP are efficient image storage formats. They are smaller than their predecessors, PNG, JPG, and GIF. This leads to smaller images, which means faster page loads, which is what we all want. Ideally, we’d also be able to use these image formats for our OpenGraph image tags (og:image).

In fact, some platforms, like WhatsApp, limit the size of a share image, so smaller would be much better.

TL;DR

No. As of July 2024, you cannot use WebP or AVIF on social platforms yet. We still have to get a few more platforms to support these image formats before it’s safe to use them as share images.

Testing image formats

I’ve run a quick test across the platforms below, and as you can see, we still have to get multiple platforms to support AVIF, and LinkedIn should really start to support WebP.

PlatformAVIFWebP
Discord❌️✅️
Facebook✅️✅️
iMessage❌️✅️
Pinterest✅️✅️
LinkedIn❌️❌️
Mastodon❌️✅️
Slack❌️✅️
Threads✅️✅️
Twitter / X❌️✅️
WhatsApp✅️✅️

How I tested AVIF and WebP

I’ve used these two test URLs:

With these URLs, I checked whether the platform would load the AVIF / WebP og:image, or show the fallback.

Below are some examples of what that looks like. The first is a successful AVIF test on WhatsApp, and the second shows LinkedIn failing to support WebP.

A headshot of Joost de Valk, author.

Joost de Valk

Joost is an internet entrepreneur from Wijchen, the Netherlands. He is the founder of Yoast. Joost is married to Marieke, who is also Yoast's former CEO. Marieke and Joost have 4 kids together and run Emilia Capital together, an investment firm.

»

Development » Can I safely use AVIF or WebP share images?