Automatic conversion not working [fixed]
-
Hello,
I had a problem with this plugin but it seems that I fixed it now.The plugin did not automatically convert images to WEBP for some unknown reason. There were no error messages when uploading an image. I reactivated the plugin and tweaked the options but it didn’t work.
However there was an error message on the plugin settings page saying there was something wrong with the rewrites. This was a bit confusing, because I was able to manually reconvert the already uploaded images and I checked the web server response of those images. The mime type was definetly image/webp. So, it was basically working but why no automatic conversion?
I read the sticky posts in this forum and found out, the automatic conversion does not happen when a problem is detected. Ok, but why does the plugin think there is a problem if it works when I tested it?
The error message did not contain much useful information, so I took a look at the plugin files. Somewhere in there is a function trying to figure out the file size of a test WEBP image using curl. That curl request failed for me, because I am using the WordPress Docker image and bound the apache port 80 to port 8888 on the outside. The curl request tried to reach 127.0.0.1:8888 which was not available within the docker container. I used
var_dump(curl_error($ch))
to get me a meaningful error message.So I reconfigured my docker setup and web server port 80 is now mapped on port 80 on the outside. Problem solved, automatic conversion works.
After this, I’d like to request:
- More meaningful error messages, that give me an idea of what exactly is wrong / needs to be fixed.
- An indicator stating that automatic conversion is active/inactive.
- Maybe a way to activate automatic conversion although an error has been detected.
- The topic ‘Automatic conversion not working [fixed]’ is closed to new replies.