[WP Smush Pro] Smush Pro and BuddyPress not working

Hi. Having a problem with Smush Pro and images uploaded by members, including admins, through BuddyPress and RT Media. They aren't getting smushed automatically and I just had to go in and manually do a bulk smush.

Is the problem with your plugin not intercepting the uploads or RT Media doing the upload in a non standard way?

Can you please fix this to make Smush work with BuddyPress and RT Media?

I am also using WP Offload media and Cloudflare business.

I have given you access to my site.

Thanks,

Dale.

  • Pawel
    • Staff

    Hello Dale!

    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. In case of BuddyPress and RT Media, the files are uploaded to a separate directory and not included in the Media Library.

    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,

    Pawel

  • Dale
    • WPMU DEV Initiate

    Hi,

    Maybe this is how BuddyPress used to work but I just took a look at my site’s media library and the uploaded images are definitely in the media library and Offloaded through Offload Media to our S3 bucket.

    This is also confirmed as I was able to smush them through a manual press of bulk smush button not through directory smushing.

    I have activated your access to my site so you can take a look to see the images there. You can even upload an image through your account’s BP profile page to see it go into the media library.

    Dale.

  • Pawel
    • Staff

    Hello Dale!

    Thank you for the update!

    Actually, I tried uploading an image, please check this link: https://mydisabilitymatters.club/activity/p/60852/

    When I'm using web development tools in Chrome, it shows that this image was uploaded to a separate folder at /wp-content/uploads/bpfb/ Please see attached screenshot. It's also not added to Media Library and I can Smush it, but only by using Directory Smush.

    I might be wrong and you may be talking about something else completely. If so, please give me some steps so I can reproduce the issue you are reporting.

    Kind regards,

    Pawel

  • Dale
    • WPMU DEV Initiate

    It seems that we are both partially right and there is a plugin doing something incorrectly.

    If you upload an image from the media tab of a members profile it goes through RT Media and ends up in the media library but does not get auto smushed.

    https://mydisabilitymatters.club/members/dale.reardon/media

    On the main activity page with the update text field there are 2 options. There are 3 links saying add image, add link and add video. If you upload an image using those options then it doesn’t go through the media library – are you able to tell which plugin is adding those options?

    But there is then an upload button to choose a file upload and if you use that option then it does go into the media library but doesn’t get auto smushed.

    Dale.

  • Pawel
    • Staff

    Hello Dale!

    I hope you’re well today and thank you for your update!

    Yes, we are both partially right! The plugin which adds those three buttons is BuddyPress Activity Plus. It uploads the files which are then presented in the Activity tab in the admin area. The images get uploaded to a separate directory, not to the WordPress library.

    I’ve looked for a possible workaround, so that maybe adding a snippet of code could make a connection between both plugins, but couldn’t find any. I asked the Smush team for assistance and I’m waiting for feedback. I’ll keep you updated as soon as I hear back from them. It’s weekend now, so please allow us a couple of days for a response.

    There’s also a similar request from another member to integrate the two plugins and I’m creating another one from your ticket so that the team knows this is a feature our members are looking forwads to be included.

    Kind regards,

    Pawel

  • Dale
    • WPMU DEV Initiate

    Thanks very much. I note that Activity Plus is a WPMUDEV plugin so it would be great and the best solution if they could make it work with the media library so that all the user uploads are offloaded to Amazon S3 otherwise my server will get full.

    Dale.

  • Dale
    • WPMU DEV Initiate

    Also is making Smush Pro automatically work with all RT Media uploads now on the roadmap?

    Or do you need RT Media to change something in their plugin to make it work automatically?

    I checked with RT Media and everything definitely goes through the media library.

    Dale.

  • Pawel
    • Staff

    Hello Dale!

    I hope you’re well today!

    Yes, I posted a task for this and the developers have added it to the roadmap. From what I can see, they already have some ideas on what to add to the Smush code to ensure media uploaded from RT Media and Activity are also handled.

    Kind regards,

    Pawel

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.