Vikas_Dangi reported that orphan images uploaded to Amazon S3 were not being automatically removed, despite having the ‘Remove orphan unreferenced uploads’ setting enabled. codinghorror initially suggested S3 cleanup might not be supported, but zogstrip clarified that orphan cleanup should work for both local and S3 storage, with S3 tombstone cleanup handled automatically via policy. Vikas_Dangi confirmed the ‘clean_up_uploads’ setting was enabled with a 1-hour grace period and insisted the image was unused (not in posts, avatars, or profiles). Mittineague questioned how the image was uploaded — Vikas_Dangi explained it was via the composer’s upload button but the post was canceled, leaving the image orphaned in a draft. Mittineague suspected the image remained in the draft state, preventing cleanup. Vikas_Dangi confirmed the image persisted on S3 despite this. Eventually, Vikas_Dangi reported the issue resolved, though no specific fix was detailed. The discussion highlights potential confusion around draft uploads and S3 orphan cleanup behavior, with cleanup logic depending on whether the upload is truly unreferenced or retained in draft state.
Cleaning up orphan uploads should work for both local and S3 storages.
The only difference between the local and S3 storages is that the cleanup of the tombstone is automatically handled by S3 via a policy.
@Vikas_Dangi have you enabled the clean_up_uploads site setting? Are you sure that image isn’t used somewhere else (avatar, user profile, category image, etc..)?
I have uploaded it through upload button. But didn’t posted it in the topic, so it became orphan image. But my problem is that the orphaned imaged not removing automatically.