# Is er een standaardmanier om een afbeelding permanent te verwijderen uit de revisiegeschiedenis?

**URL:** https://meta.discourse.org/t/is-there-a-standard-way-to-permanently-delete-an-image-from-the-revision-history/230892
**Category:** Support
**Created:** [23 juni 2022 om 12:42 UTC](https://meta.discourse.org/t/is-there-a-standard-way-to-permanently-delete-an-image-from-the-revision-history/230892 "2022-06-23T12:42:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [23 juni 2022 om 12:42 UTC](https://meta.discourse.org/t/is-there-a-standard-way-to-permanently-delete-an-image-from-the-revision-history/230892/1 "2022-06-23T12:42:37Z")

</div>

Whilst it is easy to [permanently delete a Topic](https://meta.discourse.org/t/introducing-permanently-delete-post-functionality/207109/12), 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?

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [23 juni 2022 om 12:56 UTC](https://meta.discourse.org/t/is-there-a-standard-way-to-permanently-delete-an-image-from-the-revision-history/230892/2 "2022-06-23T12:56:52Z")

</div>

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

> [@How to make an image orphaned so that it gets removed?](https://meta.discourse.org/t/how-to-make-an-image-orphaned-so-that-it-gets-removed/79231/3):
>
> TL;DR: an image is orphaned if and only if it’s not referenced
> 
> - in the latest version of a post
> - in a draft
> - in a queued post
> - in a logo site setting
> - in a custom emoji
> - in a theme
> - in a user avatar/background/card image
> - in a category logo/background image

> [@How to make an image orphaned so that it gets removed?](https://meta.discourse.org/t/how-to-make-an-image-orphaned-so-that-it-gets-removed/79231):
>
> Because message revisions are kept, and older removed messages are also kept, and even removed topics are still there in database, how do I make an image orphaned so it gets removed automatically by a sidekiq job?

> [@How can I soft-delete a topic?](https://meta.discourse.org/t/how-can-i-soft-delete-a-topic/28300):
>
> I can turn it invisible, close it and delete it, but how can I soft-delete it in case I need to see the content or IP of the author in the future? Thanks!

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.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [23 juni 2022 om 13:12 UTC](https://meta.discourse.org/t/is-there-a-standard-way-to-permanently-delete-an-image-from-the-revision-history/230892/3 "2022-06-23T13:12:48Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [23 juni 2022 om 13:33 UTC](https://meta.discourse.org/t/is-there-a-standard-way-to-permanently-delete-an-image-from-the-revision-history/230892/4 "2022-06-23T13:33:55Z")

</div>

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

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/5/4/c54da9b5dd525f203fce6c406ac7310f9b25fbd9.png)

---

<div class="post-metadata">

### Author: ![Tris20](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tris20/32/264639_2.png) [@Tris20](https://meta.discourse.org/u/Tris20)
#### Post date: [23 juli 2022 om 13:34 UTC](https://meta.discourse.org/t/is-there-a-standard-way-to-permanently-delete-an-image-from-the-revision-history/230892/5 "2022-07-23T13:34:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
