Removing Images from BuddyPress Activity Stream Automatically


#1

Hi, I’m using BuddyPress 2.6.0 and rtMedia 4.0.2. If a post is deleted it does not automatically delete the image in WordPress media library.

Is there a way to automatically remove the image either via a plugin or php code?

Thanks


#2

Hello @g_briar_888,

Could you please elaborate it a little more from where you are uploading the media? Are you using rtMedia uploader? If possible, please provide a screenshot.

Thank you.


#3

Hi

I’m using BuddyPress Activity with the rtMedia plugin installed. When a user makes a post they can upload images using rtMedia. That all works perfectly.

However, if the user or admin removes a post it leaves behind the image in the Media Library. I was wondering if it was possible to set it up so that if a post in BuddyPress Activity was removed by either the member or admin it would automatically remove the image from the library. The reason for this is that it currently requires the admin to go in and manually remove images where posts have been deleted.

Is there a solution for this?

Thank you.

Graham


#4

Hi @g_briar_888,

If media is uploaded through BuddyPress activity and user deletes that activity post afterwards then that media will also be deleted from the gallery.

You can check this out at our demo site here - http://demo.rtmedia.io/

This is the default behaviour and it should work. Please, could you check if this issue persists once you activate any default theme of WordPress and deactivate other plugins? this way we can avoid conflicts if there are any.

Thank you.


#5