[WP Smush Pro] Automated Directory Smush

Is there a way to configure WP Smush Pro to automatically smush images in a particular non WP Media library directory? eg
wp-content/uploads/<custom-plugin> as seen in this screenshot http://take.ms/6sEQ6

It Smushes fine on that directory when run manually but would prefer if it happened automatically.


  • Adam Czajczyk

    Hello Mettro

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

    Currently there's no option to set "automatic" or "scheduled" runs for Directory Smushing. The plugin can can smush images automatically but only those that are being uploaded to Media Library via WordPress.

    That is because the smushing process can be triggered by hooking up to some native WP routines that are called when an image is uploaded.

    Automatic smushing for "directory smushing" would have to be either scheduled based on WP Cron - so e.g. run every day or every week - or would have to constantly monitor file changes in selected folders. I believe that the latter would cause very high server load and could actually lead to some unexpected issues. However, the "scheduled" smushing could be doable, I think.

    While it's not there yet, we're constantly improving Smush so there's plenty of room for improvements. Do you think that such scheduled smushing would work for you? Or, perhaps, you do have some additional ideas/suggestions on how that could work "technically"?

    I'll be happy to hear your feedback on this so I could then discuss it with our developers :slight_smile:

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.