Is there a standard way to permanently delete an image from the revision history?

AI-generated summary

The discussion revolves around permanently deleting an image from the revision history in Discourse. Tris20 asks if there’s a standard method to remove a specific image while keeping the rest of the topic intact, especially for compliance with confidentiality regulations. They note that deleting the image from a post doesn’t immediately remove it from the server; instead, it becomes orphaned and is deleted after a waiting period (default 48 hours) if not referenced elsewhere. RGJ confirms that the image must be removed from the post’s markdown and then waited for to be orphaned. Tris20 clarifies that once orphaned, the image is removed from the server, though it may still appear in the browser’s local cache. The discussion references meta.discourse.org for more details on orphaned images.

Whilst it is easy to permanently delete a Topic, I can’t see a standard way to permanently delete a specific image whilst simultaneously retaining the rest of the Topic.

The problem this creates is as follows:

  1. User posts confidential image
  2. Confidential image is deleted – but remains in revision history, and therefore in database

To adhere to confidentiality regulations, I need to be able to delete that image from the database. Currently I get the url of the image, hunt it down in the server, and delete it directly. This isn’t particularly fluid, and I don’t like the idea of deleting the image file, without cleaning up the references to in in the Database.

I could make a python script to automate the steps I take for deletion, simply giving the url of the image as an argument, but I’m wondering if maybe there is already a proper/standard way of doing this?

Actually it looks like this is done automatically if you delete the image, and it is not used anywhere else

When using a browser which has already viewed the image, I can still see the image in the revision history, but it is only a local copy made by the browser – the image is no longer on the server, and it cannot be seen by other users unless they have seen it previously.

Hmm, are you sure? AFAIK you must remove the image from the post (i.e. delete the link from the markdown) and then wait until the image is orphaned and removed.

Can you please describe the exact steps you’re taking?

Hey Richard, you’re correct. I should have mentioned the waiting period. Mine is the default 48 hours