I've inherited a very poorly designed WordPress site that in part uses BuddyPress for a directory type section. Users are able to upload profile images and 'product' images to their profile.
As a result, we now have roughly 20GB of images on the site and desperately need to cut back on this. When users, stop paying a membership fee to the charity running the site, the users role is changed from one of several custom roles back to the WP 'Subscriber' role.
My hope is that there is a fairly simple and accurate way to find images associated with a user or users profile and then delete these images if the users is has the 'Subscriber' role.
At present I've not tried anything along these lines, and am hoping someone with more WP dev experience might be able to give me some tips / suggestions on how to approach this.
Thanks in advance.