Uploading WebP images in Wordpress Media Library

Uploading WebP images in Wordpress Media Library

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

Uploading WebP images in Wordpress Media Library

When attempting to upload a WebP image through WordPress's media library, you might encounter the warning: "This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading." This error message typically appears when running WordPress 6.1.1 on environments like Plesk Obsidian v18 with Linux 7.9 and PHP 7.0.33, specifically when the server fails to recognize WebP as a supported upload format.

The root cause lies in how WordPress determines which image formats are acceptable for direct uploads. By default, WordPress restricts uploads to formats that the active media handler can process without external conversion tools. If your hosting environment lacks specific libraries or if PHP is not properly configured to handle WebP natively, WordPress assumes you don't want to risk serving corrupted images to visitors. Consequently, it forces a conversion to JPEG or PNG before storing the file in the wp-content/uploads directory.

To resolve this issue, you need to verify whether your server actually supports WebP rendering and uploading. Modern PHP versions (7.2+) often include native support for WebP via the GD library, but older setups like PHP 7.0.33 might require additional extensions or specific configuration flags. Check if the gd extension is enabled in your php.ini file by running:

php -m | grep gd

If gd is missing or outdated, upgrade your PHP version to at least 7.2. Additionally, ensure that the image/webp MIME type is correctly configured in your web server configuration (Apache or Nginx). For Apache, add this line to your .htaccess file:

AddType image/webp .webp

For Nginx, verify that the types block includes WebP:

types {
    ...
    image/webp webp;
}

Once these configurations are in place, WordPress should recognize WebP as a valid format. However, even if your server supports WebP, you may still see the warning due to how WordPress checks for support via its Site Health tool. Navigate to Tools → Site Health → Media Handling and observe whether WebP is listed under supported formats. If it's missing, it indicates that WordPress cannot find a suitable image editor plugin or built-in capability to handle WebP uploads.

In such cases, installing an image optimization plugin like EWWW Image Optimizer or ShortPixel can help. These plugins often include their own WebP handling logic and may bypass the default WordPress restrictions. Alternatively, you can manually create a symlink or use a tool like convert from ImageMagick to preprocess your images before upload:

convert input.webp output.jpg

This approach ensures compatibility but sacrifices the benefits of serving WebP natively to modern browsers.

The decision between letting WordPress handle WebP automatically versus converting them manually depends on your performance goals and server capabilities. Enabling native WebP support reduces bandwidth usage and improves load times, especially on mobile devices. However, if your audience consists mainly of older browsers that don't support WebP, serving fallback images (JPEG/PNG) becomes essential for consistent user experience.

Before making changes, always test on a staging environment to avoid breaking existing media workflows or causing unexpected behavior in production. Remember that enabling WebP isn't just about uploading—it's about ensuring your entire stack can serve and process these files efficiently without manual intervention every time you add new content.

Our network