Hi @triplecomp,
Thank you for your message.
Are you using Cloudflare? Error 524 appears on Cloudflare when a script takes longer than 100 seconds to execute. You probably have a lot of images on your website. Do you have access to WP-CLI on your server?
The plugin allows you to convert images to WebP and AVIF formats. The converted files are saved in the /wp-content/uploads-webpc/ directory. The original files are not modified or deleted.
How does the plugin work?
When a browser tries to download an image file, the plugin checks if it supports the AVIF format (if enabled in the plugin settings). If so, the browser will receive the equivalent of the original image in the AVIF format. If it does not support AVIF, but supports the WebP format, the browser will receive the equivalent of the original image in WebP format. In case the browser does not support either WebP or AVIF, the original image is loaded. This means full support for all browsers.
Best,
Mateusz
Thanks for the reply.
I do use cloudflare. Do you think Cloudflare is timing out the process if it takes longer than 100 seconds to calculate?
That seems odd because I have other plugins that run processes that take much longer and don’t time out. Does yours do the task differently and cloudflare shuts it down?
I do have access to WP CLI
So if I uninstalled the plugin it would simply delete all webp images and my website would go back to serving the originals, is that correct?
Thanks
@triplecomp Yes, even in the error you sent me the time is given – 100.04 seconds. If other plugins make a request via HTTP that takes more than 100 seconds, Cloudflare is definitely blocking it too.
Please check the “Support for WP-CLI” question in the plugin FAQ. There you will find instructions on how to use WP-CLI. When using server commands, there are no HTTP limits that Cloudflare imposes.
So if I uninstalled the plugin it would simply delete all webp images and my website would go back to serving the originals, is that correct?
Yes – you are right.
Do you know where in cloudflare I might find the setting that is causing the script process to stop? Perhaps I could change it and try again before attempting WP CLI.
Thanks for the quick responses!
@triplecomp There is no such solution – this is a Cloudflare limit that cannot be bypassed. Please check how many images are on your website using WP-CLI and please let me know what result you get. Use the command:
wp converter-for-media calculate
Hi,
I did what you asked and it worked. Should I now do the command
wp converter-for-media regenerate
and it will work the same way like doing it from the plugin, by uploading the images to the new folder in uploads uploads-webpc ?
Thanks
@triplecomp What result did you get in response to this command?
Using the wp converter-for-media regenerate command you will run the same process as you would in the plugin settings panel.
Hi,
I got the result showing success and then the amount of images in webp and avif that can be converted
When using the wp converter-for-media regenerate
Will it use the optimal setting? Or do I have to add a command for that?
Thanks
@triplecomp Exactly how many images did you get?
When using this command, the settings that you have set in the plugin settings panel will be used. The currently set settings will be used.