You install XAMPP localhost on your system and install WordPress on in. If you want to upload a .webp format image, you must first enable a .webp image upload capability. If not, you will see the below error:
This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading.
See the image taken from the WordPress admin section:

Enable .webp Image Upload in XAMPP
Before uploading a .webp image, you must enable PHP GD Library. So follow the below steps to allow it:
- Open the XAMPP Control Panel
- In front of Apache, click on Config and select PHP (php.ini)

- Search for extension=gd and remove the semi-colon character ( ; ) before it to make it uncomment.

- Please save the file and close it.
- Stop and start the Apache and MySQL again in the XAMPP Control Panel.
See the result
You enabled .webp image upload successfully. As you can see below, after that, you can upload the image in the WordPress Media section:

Conclusion
I hope you can resolve your issue with this article. You may want to read this article too: XAMPP is Slow with WordPress and the Easy Solution
Leave a Reply