By default, WooCommerce does not allow .webp images via API to be uploaded. However, we found a solution using our Bulk Product Sync plugin. If you’re encountering an error message similar to “Sorry, you are not allowed to upload this file type” when trying to upload WebP images in WooCommerce, you can follow the steps below:
1- Add the following code to your functions.php file:
2- Save the changes to your functions.php file.
This code adds support for the WebP image format, allowing you to upload WebP images via the WooCommerce API. If you’re not comfortable editing your functions.php file, you can also use a plugin such as Code Snippets.