# Client side Optimised and Original Uploads: How can I get the ID of a given image?

**URL:** https://meta.discourse.org/t/client-side-optimised-and-original-uploads-how-can-i-get-the-id-of-a-given-image/202933
**Category:** Support
**Created:** [September 8, 2021, 8:16am UTC](https://meta.discourse.org/t/client-side-optimised-and-original-uploads-how-can-i-get-the-id-of-a-given-image/202933 "2021-09-08T08:16:29Z")
**Posts on this page:** 4
**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: [September 8, 2021, 8:16am UTC](https://meta.discourse.org/t/client-side-optimised-and-original-uploads-how-can-i-get-the-id-of-a-given-image/202933/1 "2021-09-08T08:16:29Z")

</div>

If I need to delete or modify a certain image, for example _right to be forgotten_, then I need to be able to modify/delete/replace an image in the database.

I have nothing but a sea of IDs  
 ![image](https://global.discourse-cdn.com/meta/original/3X/8/1/813376ed1f85956dfd69988848ef24098da0202f.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/c/0c3f4821b07040112f2cf946ca6206620989ef40.png)

How would I get the optimised ID of an image? for example, the ids I see in this post as:

> ![image](https://global.discourse-cdn.com/meta/original/3X/0/e/0eadd2c44624fca3dae5fcff248fcd22690e9c31.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [September 8, 2021, 8:40am UTC](https://meta.discourse.org/t/client-side-optimised-and-original-uploads-how-can-i-get-the-id-of-a-given-image/202933/2 "2021-09-08T08:40:33Z")

</div>

Can you open the image in a new tab, and look at the asset id in the address bar?

Eg.

https://d11a6trkgmumsb.cloudfront.net/original/3X/0/c/0c3f4821b07040112f2cf946ca6206620989ef40.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: [September 8, 2021, 9:00am UTC](https://meta.discourse.org/t/client-side-optimised-and-original-uploads-how-can-i-get-the-id-of-a-given-image/202933/3 "2021-09-08T09:00:25Z")

</div>

Thanks for the pointer. Interestingly though when I take th URL:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/0/e/0e3cff802e27db0b9fc51e66635f358a2878254b.png)  
And I copy the image as a buckup  
 ![image](https://global.discourse-cdn.com/meta/original/3X/e/7/e76488d70cad7839884d55fa808cd9142f379b7e.png)

and then delete the image  
 ![image](https://global.discourse-cdn.com/meta/original/3X/5/2/529f86208c4069b944a55ff8a33ffe15acb02dce.png)

I can still see it on the web page. ~~I’m going to rebuild discourse and see what happens but it’s wierd to me it can still deliver the image~~

* * *

### Edit

Cancel that, when I impersonate a user in a different browser the image is gone. I assume chrome has a temp copy which is why I can still see it. Thankfully the image has been removed successfully, and the forum is still in one piece! 🙂

> ![image](https://global.discourse-cdn.com/meta/original/3X/4/f/4f03115210098558ad3044d79dea58553ebd3fe3.png)

And if I add a new image with the previous image ID:

> ![image](https://global.discourse-cdn.com/meta/original/3X/f/9/f9b8781912bd2a7f3ee9211a951e2077ff83ec86.png)

Then the image is restored in the browser which could not see it previously:

> ![image](https://global.discourse-cdn.com/meta/original/3X/9/0/90da7eb7c3c570a8da874f0696e1d4af5dd307ae.png)

Perfect 😃

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 8, 2021, 9:01am UTC](https://meta.discourse.org/t/client-side-optimised-and-original-uploads-how-can-i-get-the-id-of-a-given-image/202933/4 "2021-10-08T09:01:03Z")

</div>

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