Home > Software design >  WordPress on localhost using Xampp Apache says "This image cannot be processed by the web serve
WordPress on localhost using Xampp Apache says "This image cannot be processed by the web serve

Time:01-08

I am creating my WordPress website on localhost using Xampp. I'm now finalizing it and uploading my product images, which are all .webp. However, I get this error when I try:

"This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading."

I looked it up online and have no idea what it means. Ideally I want to upload all my images while still on localhost. Is there a way around this?

CodePudding user response:

To enable .webp support in Apache (which is typically used with XAMPP), you can follow these steps:

Edit the php.ini configuration file: This file is usually located in the php folder inside your XAMPP installation directory. Open the file in a text editor and look for the line extension=gd.

Remove the semicolon: The line extension=gd should look like this:

;extension=gd

Removing the semicolon will enable the gd extension, which includes support for .webp images.

Save the changes to the php.ini file and close it.

Restart Apache: Open the XAMPP Control Panel and click the "Stop" button next to the Apache module. Then click the "Start" button to restart Apache.

before enabling the gd extention : enter image description here

After enabling the gd extention enter image description here

  • Related