[Smush Pro] Clarification on smush pro image processing.

In the images attached I show 5 images for jellfish-underwater-PWQTR9X-tny-3.jpg actualy in the upload directory. In the media library a reset and re smush creates 12 images. In this site there are 12 media image size settings. It was my understanding that smush pro only smushed existing images but I am seeing that smush will generate all registered images regardless of actuall images in the upload. Is this a bug or is this by design? If bug fix it if by design fix it. smush should only process actual images in the upload directory.

  • Nithin
    • Support Wizard

    Hi Lee ,

    Smush Pro will only create images based on the registered thumbnails. Thumbnails can be registered from plugins, themes etc

    I gave a quick test in my system but I’m not able to replicate such an issue when tested. The bak.jpg file is generated when you have “Store a copy of my full-size images” setting enabled in the Smush Pro plugin side. Other than that, there isn’t any instance where I could replicate such an issue.

    Also, if “Image Resizing” is enabled it can create any new thumbnails. You can check all the registered thumbnails via Smush, under Smush Pro > Bulk Smush > Image Sizes, and by clicking the “Custom” tab as shown in the screenshot:

    According to your give screenshot, if they are part of thumbnails, it should show at least 10 thumbnails in there. If you still notice issues or anomalies regarding this, then please do enable support access to your website so that we could check further if needed.

    You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Please let us know once you enable access so that we could get this sorted. Have a nice weekend ahead.

    Kind Regards,
    Nithin

    • Lee
      • Syntax Hero

      So my original question above as for claraification. support said if i dont create a thumbnail image smush would not create a smushed version since it does not regenerate or create thumbs.

      so your telling me that smush only looks at registered image size and not at the sizes actually present in the uploads directory? then creates smushed versions of all registered thumbs? where does smush put these versions? Does it put them all out on the smush cdn?

      my theme makes additional images on the fly that are not registered sizes. seems smush is picking those up and also serving them from cdn. if smush only uses registered sizes this would not work.

      please confirm how smush really works. thank you

  • Lee
    • Syntax Hero

    Additional testing. This makes it clear that smush does not look at available files to smush. It only looks at size registrations.

    I deleted all sizes. regenerated less thumbs then are registered.

    Smush has a hair ball on missing images.

    there are 12 registered sizes on this site.

  • Nithin
    • Support Wizard

    Hi Lee ,

    so your telling me that smush only looks at registered image size and not at the sizes actually present in the uploads directory? then creates smushed versions of all registered thumbs? where does smush put these versions? Does it put them all out on the smush cdn?

    My apologies, the term I used “create” is inaccurate in my previous reply, I meant to say optimize/ compress. Sorry for any confusion.

    Smush will not create any thumbnails or any registered images, that action is done by WordPress when an image is uploaded via the Media Library. Smush will only optimize the existing thumbnail images present in the /uploads folder.

    If there are any images registered in the WordPress side via your theme, or plugins, smush would be able to detect such images and optimize if the images are physically present in the /uploads folder. If the registered size isn’t physically present in the /uploads directory, Smush will only optimize the images which are present in the folder.

    Regarding Smush CDN, it only serves proper images via the HTML attribute “srcset”, and “sizes” for various devices, and screen sizes automatically.

    However, the number of 12 images shown in the screenshot, compared to the total number of images present in the /uploads directory is incorrect, and it should have been the same number of images in both ends under /uploads/2019/10/ directory, but that isn’t the case in your side as shared in the screenshot.

    Did you check the “Image Sizes” setting in Smush Pro side as shown in my previous screenshot? Smush detects all the registered sizes in your website, and It should list out the total number of images which is registered by the theme, and plugins under “Image Sizes“. Maybe that would give a clue on the number of registered images on the website, and if it does detect more than 10 or 12 registered images, most probably it might be a conflict.

    Are you able to replicate the same in other websites?

    my theme makes additional images on the fly that are not registered sizes. seems smush is picking those up and also serving them from cdn. if smush only uses registered sizes this would not work.

    How are the additional images added on the fly? Is it a custom code? or via plugin? By default, the WordPress coding standard recommends registering images via the add_image_size function, and once an image is uploaded via the Media Library it should be creating newly registered image thumbnails based on the add_image_size functions.

    If you could enable support access to the website it would give us a better idea regarding how the image upload workflow behaves too.

    It’s tough to say what exactly is causing the issue without going through the website, please do enable support access to your website or if you have a staging website support access to the website would help too.

    Please let us know once you enable access so that we could give a closer look. Have a good day.

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.