Identify and delete unused images

I have a page where the user can upload an image and it gets stored in CF images right away. Although it is uploaded it is not “finalized”. The user has to press a button to “Publish” it to make it official. If they click the “Cancel” button instead, the image should be deleted from CF. This works fine. However if the user just kills the browser the image stays in CF but it is not associated with the page anymore since the URL to the image is not saved to the database (which happens during the “publish”).

Is there a way to identify orphaned images likes this, that are not used and delete them? I would like to have a page that will list the images not requested even once for a month for example. The the user can select individual images or all and remove them from CF.

Is it possible to get the list of images that are not requested for certain amount of time?

Hi, unfortunately we don’t have currently such thing as either orphaned images or analytics that can tell you which images haven’t been requested.

One recommendation would be to make an upload to Cloudflare when user presses Publish button.

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