• Resolved triplecomp

    (@triplecomp)


    Hi,

    When waiting for the bulk image optimization of images to calculate the list of files that can be optimized, I get an error:

    HTTP Error 524 (100.04s): “<!DOCTYPE html>\n<!–[if lt IE 7]> <html class=\”no-js ie6 oldie\” lang=\”en-US\”> <![endif]–>\n<!–[if IE 7]> <html class=\”no-js ie7 oldie\” lang=\”en-US\”> <![endif]–> (and it keeps going like this for a while)

    My second question: Once I have optimized all images to use webp, does that make a new copy of my images and store them in the upload folder? Does it make a copy of all different sizes of a single image?
    If I deactivate and uninstall the plugin, will my website automatically use my original images again? Will I need to delete webp images from my server or will the plugin remove those after being uninstalled?

    I just want to know the answers before I run the bulk process in case something went wrong.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    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

    Thread Starter triplecomp

    (@triplecomp)

    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

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @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.

    Thread Starter triplecomp

    (@triplecomp)

    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!

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @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

    Thread Starter triplecomp

    (@triplecomp)

    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

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @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.

    Thread Starter triplecomp

    (@triplecomp)

    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

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @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.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Bulk optimization of images error’ is closed to new replies.