2

There's a comment to this great answer that remains unanswered:

Is there a script that automatically checks for images that are not in any posts (removed by editing) and purges the images from the server automatically?

I'd like to work-it-out to the full question.

This answer provides explanation that Stack Exchange uses imgur Pro account, so images are not automatically expired after three months on imgur side.

What about SE side? Is there any "unused images clean-up" script?

11
  • 3
    No, there is not. On request a single image can be removed by SE staff.
    – rene
    Jan 6, 2023 at 15:29
  • 1
    Yes, I know. But you must prove to the SE staff that you are not insane / crazy. Thank you. Care to change your comment into an answer to be accepted?
    – trejder
    Jan 6, 2023 at 15:31
  • 3
    Shog says you have to prove to a moderator that you're not crazy. That's a much lower bar, as all the moderators are crazy already. Anyway... why do you think that there should be some sort of automated clean-up? What problem would that solve? Jan 6, 2023 at 15:33
  • 1
    It would solve exactly the same problem as I described below Shog9's post and that I am writing in my another question here: Contrary to what he says, editing a post does not solve the problem, because link to sensitive image (that stays on imgur servers forever) can be easily read from post history. If we remove unlinked image from imgur anyone can easily use that link (in post history), because it will no longer point to an existing image (that contains sensitive data). Now it points.
    – trejder
    Jan 6, 2023 at 15:43
  • @trejder you can ask for a redaction of the post to remove the link to the imgur image. That only leaves you the with lucky shots: jsfiddle.net/yahavbr/kq5ngx86 (careful when you check that link at work, the random images might be NSFW)
    – rene
    Jan 6, 2023 at 15:54
  • 2
    @rene In the case that the mods are redacting sensitive content in an image, I'm guessing they'd also request we remove it from imgur. :)
    – Catija
    Jan 6, 2023 at 16:25
  • @Catija you assume we have some awesome mods then? Wait ...
    – rene
    Jan 6, 2023 at 16:36
  • 2
    This looks like a question which is an XY problem. Please describe in more detail what it is you are attempting to achieve (not how you're attempting to achieve it). You're asking about the deletion of all "unlinked" images. Note: you don't say what you mean by "unlinked". I assume you mean all images which are not linked from an SE post, but it's possible you mean something more broad. However, in comments, you indicate that you're really concerned about deleting specific images, which is a very different question.
    – Makyen
    Jan 6, 2023 at 21:27
  • 1
    @Makyen I want any solution that will delete image that I have uploaded and that contains sensitive data. Deleted automatically, because human factor does not work. If we implement the solution given in cited text ("check for images that are not in any posts (removed by editing) and purge them from the server automatically") we will achieve: (a) clean up and (b) my problem solved (assuming that sensitive image's link is removed by editing).
    – trejder
    Jan 8, 2023 at 22:08
  • So, yes, this question is asking about an XY problem (i.e. it's asking about your idea for something that will solve your actual problem, rather than asking about your actual problem).
    – Makyen
    Jan 9, 2023 at 1:44
  • 1
    @Makyen Yes, and most people (out of those who voted) in the proposal for such feature said "no", so we should rather burninate this question and the whole idea.
    – trejder
    Jan 10, 2023 at 8:25

1 Answer 1

10

It's worth remembering that images aren't only used in posts - we also use imgur for images uploaded to chat, so I don't think removing the images is as simple as checking whether they're currently in use in a question or answer.

We don't do this, regardless.

There's only one situation I'm aware of where we automate deletion of images - in cases where posts are deleted as spam or as rude and abusive. We have an automation that runs daily to identify images that were used in one of these posts and requests deletion from Imgur. There are some restrictions on this to reduce the likelihood that we'll delete images that shouldn't have been - such as comparing the upload date to the post date - but I can't remember them off the top of my head and I don't think it's super important as part of an answer to your specific question.

9
  • 1
    Spam or rude or abusive images are deleted automatically, mistakenly uploaded images with sensitive data are not and must wait for moderator mercy. That is sooooo wrong.
    – trejder
    Jan 6, 2023 at 15:44
  • 7
    I don't think it's "wrong" so much as it's a matter of what we can verify. It's highly likely that an image that was posted and the post was deleted as spam/abusive is, itself, spam or abusive! But it's also very likely that an image removed from a post was simply unnecessary, not in any way sensitive. I regularly delete sensitive images from imgur because I'm kinda the person the SO mods usually ping about it... so it does get done... but we're not going to automate deleting every image when most of them aren't sensitive. :)
    – Catija
    Jan 6, 2023 at 15:47
  • 1
    Maybe this question isn't clear enough. I have clarified this issue in here. I am talking about auto-deleting only those images that were clearly marked by their authors / posters / uploaders as containing sensitive data. Not all of them. Currently, if I upload a sensitive data in form of an image, and request it to be removed by clearly marking it as sensitive, I still must wait for the mercy of people like you.
    – trejder
    Jan 6, 2023 at 15:58
  • 1
    And if some mod won't have that mercy or disagree with my argumentation then my image, containing sensitive data, will simply stay forever at imgur servers. This is wrong.
    – trejder
    Jan 6, 2023 at 15:58
  • 4
    I don't disagree that the sort of thing you're talking about might be useful but it would likely still go through a review process where a mod or CM approves the deletion. It's not uncommon for people who get frustrated about something on the site to start destroying all of their content and if they have a way to remove images unilaterally, that's permanent - we can't undo it.
    – Catija
    Jan 6, 2023 at 16:15
  • 6
    Regardless, this question is about doing it automatically - so that's what I'm responding to. This is the first time you've mentioned having a way for users to do it manually. Up until now it's been framed as automated and that would be very problematic and what my answer here and comments are reflecting.
    – Catija
    Jan 6, 2023 at 16:17
  • It looks like it deletes images from posts that were deleted by vote if there was a red flag that wasn't dismissed. (So far, this has only affected one post that I know of. The image probably should have been kept, but the answer wasn't that great so we're not missing much.)
    – Laurel
    Feb 23, 2023 at 3:55
  • It may be worth editing in an update that the auto-deletion of the image no longer occurs (but I think the image no longer embeds?).
    – V2Blast
    Jun 15, 2023 at 15:38
  • 1
    @V2Blast As far as I'm aware it was only disabled for R/A flags but not spam.
    – Catija
    Jun 15, 2023 at 15:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .