Weekly cleanup digest for duplicate Cloudinary images
Every Monday morning, an AI teammate scans your Cloudinary library for duplicate and near-duplicate images and posts a review-ready cleanup list to Slack.
Every Monday at 9am, run a duplicate-image cleanup pass on our Cloudinary environment and post a review-ready report to Slack. Nothing is ever deleted by the workflow; humans confirm the cleanup afterwards.
Step 1. Use Cloudinary Search Assets to pull every image uploaded in the last 30 days (resource_type = image, filter by created_at within the last 30 days), sorted by created_at descending. Cap the working set at around 200 images so we stay well inside the hourly Admin API budget.
Step 2. Pick a representative sample of that working set (roughly 25 to 50 images, spread across folders so we do not over-index on one campaign). For each sampled image, call Cloudinary Visual Search using the asset URL or public ID to surface visually similar assets already in the environment. Merge results into clusters, where a cluster is one seed asset plus every visually similar asset returned above a reasonable similarity threshold. Deduplicate clusters that share members so we do not report the same group twice.
Step 3. For every asset inside every remaining cluster, call Cloudinary Get Resource by Public ID to fetch created_at, bytes, width, height, format, folder, and secure_url. Drop clusters where only a single asset survives dedup.
Step 4. For each cluster, draft a recommendation. Pick the canonical version by preferring the highest resolution first, then the largest file size, then the earliest created_at, unless the asset lives in a scratch, staging, or work-in-progress style folder (in which case demote it). Mark every other asset in the cluster as a candidate delete with a short reason such as lower resolution, older upload, sits in a scratch folder, or near-identical crop. Include a one-sentence human summary of why the assets in the cluster look alike.
Step 5. Post the report to Slack using Slack Bot Send a Message to the channel the user chose during setup. Structure the message with one section per cluster: a header, the recommended canonical asset with its thumbnail link, then the candidate deletes each with their thumbnail link and reason, and finish every cluster with a clearly labelled 'awaiting human approval' line so nobody assumes the cleanup already ran. If the week produced no clusters at all, post a short 'no duplicates found this week' message instead of staying silent.
Do not call any Cloudinary delete, destroy, or bulk-remove operation under any circumstances. This workflow is recommend-only. A human reviews the Slack digest and performs any actual deletions inside the Cloudinary console.
Additional information
What does this prompt do?
- Every Monday at 9am, sweeps your Cloudinary library for images that look like duplicates or near-duplicates.
- Groups the matches into clusters and recommends which version to keep as the canonical asset.
- Flags the rest as candidate deletes with the reason (older upload, lower resolution, or sitting in a scratch folder).
- Posts the full report to Slack with thumbnails and per-cluster recommendations so your team can review before removing anything.
- Never deletes anything on its own. A human always confirms the cleanup inside Cloudinary.
What do I need to use this?
- A Cloudinary account with images to review.
- A Slack workspace and the channel where you want the weekly report to land.
- A rough sense of which folders are 'scratch' or work-in-progress so the agent can bias toward keeping the polished versions.
How can I customize it?
- Change the day and time (default Monday 9am) to fit your review rhythm.
- Adjust how far back to look (default the last 30 days) or how many images to sample each week.
- Point the report at a different Slack channel, or send it as a DM to a single reviewer.
Frequently asked questions
Will this delete images from Cloudinary automatically?
How does it decide which duplicate to keep?
What counts as a near-duplicate?
Can I run it more often than weekly?
What if my Slack channel is private?
Related templates
Stop shipping the wrong version of an asset.
Get a Monday morning cleanup digest that shows every duplicate cluster in your Cloudinary library and the safest version to keep.