Running WordPress 6.1.1 and PHP 7.0.33 hosted on Plesk Obsidian v18 and Linux 7.9
When I try to upload a webp image through WP’s media library, I get this warning:
This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading.
I went and checked WP’s site health > Media Handling and see that webp is not supported.
Any one has a solution for this?
2
Answers
WordPress added support for WebP from version
5.8
onwards and is hence supported in your newer version6.1.1
. The warning screenshot shows that your imagick library does not support WebP format in the list of formats suppoerted.You can try updating PHP version or ask your hosting provider to make sure the
libwebp
for Webp support is enabled in theImagick
module.OR
If you have SSH access you can refer to this answer on how to install/configure it on your own.
From wordpress version 5.8, webp is supported by default. Anyways add the below code snippet in your active theme’s
functions.php
file.