Another relevant topic, I posted on there as I wasn’t aware of this topic.
I believe the only way to really delete an image in an automatic way is to manually edit it out of the post before deleting it. But I’m not entirely sure that works either. I’m using identical settings to you regarding purging (but use S3 compatible storage) and I can also confirm that images never get purged if the only post containing that image (several posts can contain the same image, presumably avatars and user banners also) is deleted.
I use this solution to search to see if an image is used in additional posts, which was provided by @RGJ
Would really be great if this could be done automatically. Particularly due to Discourse handling images in a smart way, with preventing creating duplicates files if many posts use the same image. The flip side is it’s very tedious to remove individual images that have been used a lot.
I’ve had someone spam content that needed urgent removal via several accounts before and it was very stressful trying to deal with it and ensure it was entirely removed (all original files, optimised files, cdn cache, posts, avatars, user banners etc.).
I made this feature suggestion, as it would be very helpful imo. If this was implemented, as well as automatically purging content contained in deleted posts, I think all cases would be covered and could be handled without SSH access.