Is WordPress Using WebP?

Yes — WordPress uses WebP, and modern WordPress handles it well. Since WordPress 5.8, the platform supports WebP natively: you can upload, store, and serve WebP images from the Media Library without any plugin. The practical questions are how that support works and how to get the most out of it.

Native Support in WordPress Core #

WordPress relies on the image libraries compiled into PHP on your server. When those libraries include WebP support (the common case on modern hosts), WordPress can:

  • Accept .webp uploads in the Media Library.
  • Generate responsive image sizes from WebP sources.
  • Render them through the standard image markup, including srcset.

If your host’s PHP build lacks WebP support, uploads are rejected — but this is increasingly rare. You can check by uploading a small test file or inspecting your server’s phpinfo() output.

How WordPress Serves WebP #

Core WordPress does not automatically convert your existing JPEGs. It serves whatever you upload. The common workflow is:

  1. Convert your images to WebP before or during upload — see the cwebp CLI guide or batch conversion scripts for large libraries.
  2. Upload the WebP versions to the Media Library.
  3. Use themes that output the <picture> element or rely on a fallback strategy for older browsers — the pattern is explained in serving WebP with the picture element.

Themes, Plugins, and Performance #

Performance plugins such as caching and image-optimisation plugins add convenience on top of core support. They typically automate the conversion step and can generate WebP variants on the fly. The trade-off is complexity: on-the-fly conversion consumes CPU on every request unless a cache layer stores the result. For most sites, pre-converting images at build or upload time is simpler and more predictable.

Serving WebP Safely on WordPress #

Two things keep WebP delivery safe on WordPress:

  • A fallback path — if you serve WebP directly, older browsers need a JPEG or PNG fallback, via the <picture> element or a plugin that detects support.
  • Correct server headers — ensure your host sends Content-Type: image/webp and, if you use content negotiation, Vary: Accept. The full setup is covered in serving WebP with content negotiation.

Getting Started #

The quickest safe path is to convert a handful of hero images with cwebp -q 80, upload them as a test, and verify they render in current browsers while the fallback still works in an older one. Once that works, expand the conversion to the rest of your library.

Was this page helpful?