I'm trying to bulk smush all the images on my website, but

Hi,

I'm trying to bulk smush all the images on my website, but it's freezing on image 31 and no matter how many times I reload the page, and wait awhile (10 mins+) it won't go forward (occasionally it will go forward by 1 image, then it will stop again).

Last time this happened, it worked instantly as soon as one of you guys tried to do it, so I was extra sure to keep trying myself in the hope it would just work for me, but it's just not working. I'm not sure what I could be doing wrong? Is it something with my browser do you reckon? I've tried on Firefox & Chrome.

If it works for you, can you please just bulk smush all the images. I've got to deliver this website tomorrow so I'm a little concerned that I won't be able to complete it myself in time haha (it's quite late here already)

Thanks for any help in advance. Would really like to know why it doesn't work for me but seems to work for you guys when you try it. Don't want to have to bug you every time I need to bulk smush some images :slight_smile:

  • Kasia Swiderska
    • Support nomad

    Hello Luke,

    Looks like you try to Smush pretty big images there. I noticed they are stuck on picture that is 20MB - but then I tried to smush much smaller image and it took also really long time to smush it. So when it gets to 20 MB image in bulk smush your server needs much more time to send this image.
    Please try to bulk smush and leave this page for much longer time without refreshing - it should move. I can be only smushing it for one hour then WordPress will log me out.
    Browser console doesn't throw any errors so it looks like images are processed.

    kind regards,
    Kasia

  • Rupok
    • Support Ninja

    Hi Luke

    Hope you had a wonderful day.

    I tried to bulk smush once again in your site, but it's really taking longer than usual. So I'm flagging our developer for his valuable opinion regarding this and I believe, he can give us best idea regarding this.

    Have a nice day. Cheers!
    Rupok

  • Umesh Kumar
    • Code Wrangler

    Luke, The reason for Bulk Smush being stuck is, the JS timeouts while trying to upload the image (22 Mb ) to API server.

    You can try setting a higher value for the filter WP_SMUSH_API_TIMEOUT, which is set to 90s by default.
    Here is a code example:

    add_filter('WP_SMUSH_API_TIMEOUT',  'wpmu_api_timeout');
    function wpmu_api_timeout() {
     return 300;
    }

    Hope that helps, Cheers

  • Burlington Press
    • Flash Drive

    Not the original author, but this helped me *MOSTLY* fix my issue getting the following error: "Error posting to API: 500 Internal Server Error No file content sent."

    I say mostly because, instead of it happening once 10 images or so, it now happens once every 50 images.

  • Denitsa
    • WordPress Warrior

    Hello Burlington Press,
    I hope you're doing good and thanks for reaching us!

    To help keep support tickets separate, would you please open another ticket regarding your issue (using this link https://premium.wpmudev.org/forums/#question)? That way it will remain independent of this one and it ensures we don't get these issues mixed-up here.

    This helps prevent any confusion (for us) as I'm sure you understand and might also help other members looking for a similar answer.

    Regards,
    Denitsa

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.