Delete images uploaded via image component

I've uploaded two images via the actual image component itself and only need one of them. Is there a way to find/delete those files? I've searched the docs and this forum and can't find anything, I feel like I'm going crazy.

Hi @Travis_Witt
Welcome to the community!

When you upload the file, you can run another query to pull and view the files. You can use segmented control to preview the files, and when you have them separated you can chose which one to delete. You can use this post as a reference, as its the same approach.

Hope this helps!

Sorry, I'm not talking about the file dropzone, I'm talking about the actual Image component.

image
image

I don't see any option to manage uploaded images, and there are quite a few that aren't needed that we originally uploaded during testing. We've since moved to exclusively using image URLs to avoid this problem, but I'd still like to be able to delete unused images.

It all kind of depends how is the data structured during the upload, but the same approach with fileDropzone is possible with image as well.

You run a query to get the files, and then segmentedControl component just holds the values of each item in the array. You can set the image file object to be selectedItem from the segmented control.



Then you just have the button set to run a query that will filter out the selected item from the database, like in the post I linked.

That's also not what I'm asking for. I know how to use the image component - what I'm saying is that I've previously selected the Image Source's 'Upload' option and uploaded a file from my computer to Retool itself so it shows up in the drop-down list immediately below the Image Source toggle (like in the first screenshot I uploaded). If I click the drop-down, I can see every single image I have ever uploaded into the Image component.

I'm asking - how can I delete one of those images? This hasn't been uploaded to some external server using the file dropzone, and these images aren't being collected using some external query - they have been uploaded in the Image component and exist somewhere in Retool itself.

I hope that makes sense.

If you navigate to Resources, and then to Retool Storage, there should be a list of files there. Those should be the ones in the drop-down list.


Hope this is what you were looking for.

1 Like

That points me in the right direction, thanks! I don't see that option when I look under resources, but we are also self-hosted so it may be somewhere else.

For anyone else that may come across this - the images can be found in the Retool database under org_image_blobs and you can remove them using standard SQL.