Beltoft WebP

The same picture,
a fraction of the weight

Beltoft WebP puts a .webp and an .avif version next to every JPEG and PNG you upload, thumbnails included. Your server then sends the lightest format the browser says it accepts.

The plugin works fully without a license. The key is free and only switches on WordPress’s automatic updates.

Version 2.3.0Requires WordPress 6.2+Requires PHP 8.0+
forside.jpg412 KB
forside.jpg.webp148 KB
forside.jpg.avifserved96 KB

All three sit side by side. The browser says what it can read, and nginx sends the lightest one — without a character changing in your theme.

The files make themselves

You set the quality once. After that every new image gets its lightweight versions without anyone having to remember.

Converts on upload

Every JPEG and PNG gets a .webp and an .avif beside it the moment it lands in the media library, and that goes for every thumbnail size too.

You set the quality

WebP sits at 85 and AVIF at 70 by default. Both can go up or down under Settings, and either format can be switched off on its own.

Catches up the old images

wp beltoft-webp backfill works through the whole existing media library, so a site with years of images gets lightweight versions too.

Tidies up after itself

If a .webp or .avif doesn’t come out smaller than the original, there is no reason to keep it. It is removed again on its own.

Nothing changes in your theme

No picture elements, no rewritten HTML, no shortcodes. Delivery happens in nginx, so your theme and your posts stay exactly as they are.

Hooks for other plugins

beltoft_webp_file_converted and beltoft_webp_backfill_complete let other plugins react once the files are ready.

From upload to a lighter image

Two steps in WordPress and one in nginx. That last one matters: without it the files just sit there unused.

Install and pick a quality

Activate the plugin and look in at Settings Beltoft WebP. The defaults are fine for most sites.

Run the backfill once

wp beltoft-webp backfill gives your existing images the same versions. New images look after themselves from then on.

Let nginx choose

Your vhost looks at the browser’s Accept header and sends .avif or .webp when it can read them. Otherwise it gets the original.

When the quality needs changing

Turning the quality up or down leaves already-converted images alone. With --force they are rebuilt using the new settings.

# Catch up existing images wp beltoft-webp backfill # Rebuild everything at the new quality wp beltoft-webp backfill --force
v2.3.0
Latest version
AVIF
and WebP side by side
WP 6.2+
Tested up to 7.1
PHP 8.0+
Requirement

What you are likely to ask

The first one especially is worth reading before you install.

Will my images get lighter just because I install the plugin?
No. The plugin makes the files; nginx is what sends them. Without a vhost that looks at the Accept header, the .webp and .avif just sit on disk and browsers keep getting the original. That part has to be set up on the server.
Do I need to change my theme or use picture elements?
No. Your HTML is left alone. That is the whole point of letting the server make the choice instead of writing it into the markup.
I changed the quality. Why do the old images look the same?
Because they have already been converted. Run wp beltoft-webp backfill --force and they are rebuilt with the new settings.
What happens if I switch a format off?
No more of them are made, but the files already on disk stay and keep being served as before. They go when the image is deleted, or when you remove them yourself.
Does it work alongside Media Offload?
Yes. Media Offload takes the .webp and .avif files up to the bucket alongside the original. Do note that a bucket does not negotiate format the way nginx does, so your reverse proxy still has to be set up for it there.

Put fewer megabytes on the wire.

Free and open source. Get your license, run the backfill once, and let the server send the lightest format from here on.