Table of Contents

How to Use WebP Images in WordPress

Originally published: May 1, 2021 · Last updated: August 13, 2026

WebP is a modern image format designed to deliver smaller files than many traditional JPEG or PNG images while preserving useful visual quality. On WordPress, using WebP is much simpler than it used to be: current WordPress versions can accept WebP images directly in the Media Library.

Do you need a plugin to upload WebP?

No. Native WebP upload support was added to WordPress in version 5.8. If your hosting environment supports the format correctly, you can upload a .webp file just as you would upload a JPEG or PNG.

That does not mean every image should automatically become WebP. The best format still depends on the source image, transparency requirements, editing workflow and browser delivery strategy.

What WordPress does with a WebP upload

When you upload an image, WordPress normally creates several intermediate image sizes for responsive delivery. By default, those generated sizes generally use the same format as the source image. So if you upload WebP, the generated thumbnail and other sub-sizes can also be WebP.

Developers can change the output format for generated image sizes with WordPress filters, and performance plugins or image-optimization services may also create WebP or AVIF variants automatically.

Three sensible ways to use WebP

1. Upload WebP files directly

This is the simplest option for a small site or a workflow where images are already exported from Photoshop, Affinity Photo, Lightroom or another image editor. Optimize the image before uploading, choose realistic pixel dimensions, and let WordPress create the smaller responsive sizes.

2. Let an image optimization plugin create modern formats

This is useful when you already have a large media library of JPEG and PNG files. A reputable optimization plugin can generate modern variants and deliver the best version to compatible browsers. Check carefully whether the plugin rewrites files permanently, creates additional files, uses a CDN, or requires a subscription.

3. Generate modern sub-sizes programmatically

Developers can use WordPress image filters to make generated image sizes use another format. This can be useful on controlled projects, but it should be tested on staging first because image processing depends on server libraries such as GD or ImageMagick.

WebP is not a substitute for image optimization

A poorly prepared 4000-pixel-wide WebP image can still be unnecessarily heavy. Image performance depends on several factors: dimensions, compression quality, responsive image sizes, lazy loading, caching and how many images are loaded on the page.

For most WordPress sites, start with the basics:

  • upload images close to the maximum size actually needed;
  • compress them sensibly;
  • keep WordPress responsive image markup intact;
  • avoid replacing every PNG blindly, especially when transparency or sharp UI graphics matter;
  • measure the result with real page-performance tools rather than assuming that a file extension guarantees speed.

Should you convert your old media library?

Not automatically. If an existing site already performs well, a mass conversion can create a lot of new files for limited gain. Prioritize high-traffic pages, large hero images and clearly oversized assets first. If you decide to regenerate old media, take a backup before running bulk conversion or thumbnail-regeneration tools.

WebP, AVIF and the future

WebP is no longer the only modern format available. AVIF can often produce even smaller images in suitable cases. The practical approach is not to chase a single format, but to use the format and delivery method that produce good visual quality at the lowest reasonable transfer cost.

Official reference: WordPress image handling and WebP support.