Actions23
- Upload Actions
- Transform Actions
- Asset Actions
- Widget Actions
- Library Actions
- Asset (Legacy, by Public ID) Actions
Asset → Delete Assets
AI-generatedOverview
This node operation deletes specified assets from the Cloudinary media library. It supports deleting images, videos, or raw files by their public IDs. Users can specify the type of asset storage (upload, private, authenticated, or fetch) and configure options such as invalidating CDN cache, keeping the original asset while deleting derived versions, handling pagination for large batches, and targeting specific transformations for deletion. This operation is useful for managing and cleaning up media assets in Cloudinary, for example, removing outdated images or videos from a website or application.
Use Case Examples
- Deleting a single image asset by its public ID to free up storage.
- Removing multiple video assets by providing a comma-separated list of public IDs.
- Deleting only derived versions of an asset while keeping the original file intact.
- Invalidating CDN cache to ensure deleted assets are no longer served to users.
Properties
| Name | Meaning |
|---|---|
| Public ID(s) | Asset(s) to delete, identified by their public IDs. Accepts single or multiple IDs separated by commas or as arrays from expressions. |
| Resource Type | The type of asset to delete, such as image, video, or raw file. |
| Type | The storage type of the asset, indicating how the asset is stored in Cloudinary. |
| Delete Options | Additional options to customize the deletion process, such as invalidating CDN cache, keeping original assets, pagination cursor for batch deletes, and specifying transformations to delete. |
Output
JSON
public_id- The public ID of the deleted asset.result- The result status of the delete operation, e.g., 'ok' or error message.next_cursor- Pagination cursor for continuing deletion if applicable.
Dependencies
- Cloudinary API credentials including cloud name, API key, and API secret
Troubleshooting
- Ensure valid Cloudinary credentials are provided; authentication errors will prevent asset deletion.
- Verify that the public IDs specified exist and are correct; invalid IDs will cause errors.
- If deleting large batches, use the 'Next Cursor' option to paginate through results.
- Check network connectivity and Cloudinary service status if requests fail.
Links
- Cloudinary Delete Asset API - Official Cloudinary documentation on deleting assets via API.