[Smush Pro] Slow Bulk Smush

Hi,

I’ve started Bulk Smush all images at the wp plugin page, but this is taking so long. 8 hours to process 340 images?

It says I need to smush 5100 images. Does the plugin scan for which images are published on the website or doest it smush all images in my media library history?

Thanks.

  • Victor
    • WPMU DEV Initiate

    Hi.

    I was waiting the Smush Pro finish the process but I’ve waited for 2 days, my computer remained with the webpage opened and processing. It took an eternity to process 1000 images, and then I noticed my website was broken.

    All images with url attributes ?webp=1 was unable to load.

    What is happening here?

  • Jovan
    • Ex Staff

    Hi Victor

    Thank you for your feedback.

    Smush CDN can’t be turned on for your website because you have reached the 10GB CDN limit. You can see that here and from there you can also upgrade your plan if you want to keep using CDN.

    If you don’t want to upgrade CDN plan you can also serve images in webp format locally. See how to do that here.

    Kind regards,
    Jovan

  • Victor
    • WPMU DEV Initiate

    Hi,

    I never said that I wanted to turn on CDN. I just want to use webp feature without Wpmudev CDN.

    The problem is, when I activate this feature and start smushing, the process never ends.

    I know I have many images in my media library, but not all images are published. Is it possible to smush only published images?

    Thanks.

  • Patrick Freitas
    • FLS

    Hi Victor

    Thank you for the support access.

    I checked the Smush performance it is running just fine, as you told the problem is the number of files.

    There are around 6.000 images on the media library, running the Bulk Smush the plugin won’t covert the image on your website, it sends the file to our API, we Smush and then send it back to the server.

    This API process will take some time, you can upgrade your PHP to 7.4 which is faster than 7.2 but it will help the plugins but still the delay of the API.

    If you are familiar with SSH, you can run the Bulk Smush using the command line which is much faster: https://wpmudev.com/docs/api-plugin-development/smush-api-docs/

    An important note about WebP, make sure to have enough storage on the server, the WebP converts and keep the original image version which can duplicate your usage.

    The current usage for media folder:

    Tamanho do diretório de arquivos enviados 12,44 GB

    Let us know if you have any additional question.
    Best Regards
    Patrick Freitas

  • Victor
    • WPMU DEV Initiate

    Hi,

    I’m familiar with SSH, I’ve tested some commands from this documentation and it is working fine.

    Although, I’ve got a few questions:

    1. When I run:
    wp smush list
    It returns all unoptimized images from current folder. But when I run
    wp smush compress
    Will it start to compress all images from uploads folder or will it compress images from current folder as well?

    2. When I run wp smush compress, I have no feedback from the server in console until the process is complete. Do I need to keep ssh connection active while the process is running?

    3. I’ve run in a specific folder: wp smush list which has returned a list with unoptimized images with ID’s.
    Then I’ve run wp smush compress --type=single --image=ID for one of listed ID’s and the process returned success.
    wp smush list again and same images on the list. Am I missing something? Maybe optimized images would be in a different folder, so I will always get the same unoptimized list when running wp smush list from this folder.

  • Patrick Freitas
    • FLS

    Hi Victor

    I hope you are doing well.

    You need to keep the SSH active while the command runs, it should have a per cent to show status on the screen.

    About the folder, it runs under the WordPress Media Library folders.

    In case it isn’t happening on your end, let us know and we can take a closer look.

    Best Regards
    Patrick Freitas

  • Victor
    • WPMU DEV Initiate

    Hi,

    Wp smush is not running as expected on SSH.

    – I would like to bulk smush all images to convert jpg and png to webp format and serve them locally on my website.

    ‘WP SMUSH LIST’ does not returns 5377 image list. ‘WP SMUSH COMPRESS’ runs and nothing happens.

    Please, see my screenshots.

    Thanks.

  • Patrick Freitas
    • FLS

    Hi Victor

    I hope you are doing well.

    I took a closer look at this and you are correct, the wp smush list will return the images that never was compressed while the wp smush compress won’t convert to WebP.

    We already reported this issue to the plugin developer to improve the CLI integration.

    I’m afraid we can’t give an estimated time and it would be necessary to run the process from the interface.

    Best Regards
    Patrick Freitas

  • Patrick Freitas
    • FLS

    Hi Victor

    Let me update my previous reply.

    The plugin team confirmed that the Smush does convert the WebP using the CLI, the missing feature is the re-smush process, for example, if you had all images smushed already and then enabled the WebP, the plugin needs to Re-Smush those images and this isn’t working on CLI.

    I hope we can improve this behaviour soon,

    Best Regards
    Patrick Freitas

  • Patrick Freitas
    • FLS

    Hi Victor

    I’m afraid no,

    You would need to have the Copy the Small original image versions option enabled then restore the original images and regenerate the thumbnails, it would end taking more time than the Re-Smush from the interface.

    I pinged the plugin team to verify if we have plans to add the support to re-smush on the upcoming version.

    We will let you know once hearing back from the team.
    Best Regards
    Patrick Freitas