WP Smush Pro all images are smushed/189 images need smushing

I've signed up for the 14 day trial, uninstalled WP Smush and installed WP Smush Pro. I ran Bulk Smush, and it ran through my images and attachments, then shows "All images are smushed and up to date. Awesome!". Then if I click Re-Check Images, it comes back and says "Joni, you have 189 images that need re-compressing!". After the Bulk Smush, it says that 359/546 attachments were smushed, then after I click Re-Check Images, it says 13/546 attachments are smushed, and 189 imaged need to be smushed. Perhaps I'm not understanding the nuance between "image" and "attachment". Is there something I need to do to effect re-compressing? Thank you.

  • Adam Czajczyk
    • Support Gorilla

    Hello Joni,

    I hope you're well today and thank you for your question!

    I checked the site and I could replicate the issue there. I also noticed that smushing some of the images "manually" (via Media Library) correctly affects the number of optimized images on "WP Smush" page. I suppose than that something goes wrong during the process, thus causing that issue.

    I would like then to check debugging log of the site. Please add following lines to the "wp-config.php" file of your site:

    define('WP_DEBUG',true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    Make sure please that these lines are placed above the "/* That's all, stop editing... */" line and after they are added follow these steps:

    - run bulk smushing again
    - after it completes run "re-check" images
    - download the "debug.log" file from the "/wp-content" folder of your site via FTP (or cPanel's "File Manager" tool)
    - rename the file to "debug.txt"
    - attach it to your replay here.

    Hopefully the content of that file will give us a clue on what is happening :slight_smile:

    Best regards,
    Adam

  • Joni
    • WPMU DEV Initiate

    Hi. Thank you for checking into this. I've followed your instructions and the file is attached. I've also installed Hummingbird and have that set up, however I'm not seeing any great leaps in site speed, unless this is holding things up. I have a question about caching - we've used caching previously but when we set up some e-commerce features, the caching caused problems with purchases, so I dropped the caching. I'm concerned that if I enable caching again, the issues will reoccur. Is there a way to cache everything except Events Manager and WooCommerce? Thanks for your help.

  • Dimitris
    • Support Star

    Hey there Joni,

    hope you're doing good and don't mind chiming in here! :slight_smile:

    It seems that your file exceeds the 5MB limitation of attachments here in our forums.
    Could you please use a service like Dropbox or Google Drive to upload the file and post here the shareable link?

    About the caching issue, please create a new thread as we tend to keep threads related to one member and one issue each time. It's more easy for other support staff members to follow up and other users will find more useful threads in the future searching the web, hopefully specific to the initial thread's title and description.
    https://premium.wpmudev.org/forums/#question

    Warm regards,
    Dimitris

  • Joni
    • WPMU DEV Initiate

    I looked through the debug file and did find a reference to wp-smush.

    [06-Jan-2017 18:45:48 UTC] PHP Warning: finfo::file(/var/www/wppublic/wp-content/uploads/2014/09/ZacharyWeglos-267x198.png): failed to open stream: Permission denied in /var/www/wppublic/wp-content/plugins/wp-smush-pro/lib/class-wp-smush.php on line 381
    [06-Jan-2017 18:45:48 UTC] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /var/www/wppublic/wp-content/plugins/wp-smush-pro/lib/class-wp-smush.php on line 647
    [06-Jan-2017 18:45:48 UTC] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/wppublic/wp-content/plugins/wp-smush-pro/lib/class-wp-smush.php on line 679

    I hope that helps. Thanks.

  • Adam Czajczyk
    • Support Gorilla

    Hello Joni,

    Thank you for sharing that!

    These lines suggest that some files (in this case the ZacharyWeglos-267x198.png image) cannot be opened by WP Smush due to the file restrictions.

    That's a bit strange, I admit, because the plugin is able to Smush other files and usually files in Media Library they have the same permissions set up. Let's however start with checking that :slight_smile:

    Please access your site install with FTP (or cPanel's "File Manager" tool) and go to "/wp-content" folder then try to set permissions to "uploads" folder inside it to 0755 (default for WordPress). Make sure please that you marked the "Recursive" option while doing it so the changes would be applied to sub-folders of "uploads" folder.

    Then give WP Smush another try please and let me know about result.

    It would also be great if you could grant me a support access to your site so I could check its configuration and review it myself. To do this, please follow this guide here:

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.