If you find that storage is a relatively large part of your account's usage and you want to reduce that usage rather than upgrading to a larger plan, there are several options available for removing assets from your account.
We've outlined a few scenarios and tips below to help you optimally manage your account's storage, and use of these methods can help you to keep within your plan's limits limits or avoid unnecessary upgrades.
Resize original assets at upload time
If your original assets are much larger than how you use those assets in your website or application, you can use the incoming transformation feature to modify uploaded assets before they're stored in your account. By applying an incoming transformation that limits the size of the uploaded file to some maximum dimensions, larger files will be scaled down before being saved as the "original" asset in your account.
For existing resources, you can overwrite your original assets with resized copies of the same files by using the limit
crop method.
Store original assets in efficient formats
If your original assets are in "heavy" formats like PNG, you could switch to storing them in "low weight" formats such as JPG or FLIF/AVIF/WEBP instead, so that your original assets are smaller.
Similarly to the above tip, you could overwrite existing with smaller versions of themselves to reduce storage from existing original files.
Clear old original or derived assets
You can delete original or derived images using several criteria including their creation date using the Bulk Delete feature.
Alternatively, you programmatically use the Admin API to deleting resources based on your own criteria or requirements for which assets are no longer needed by your application.
Clear images that haven't been accessed recently
Enterprise customers can request access to the last_access_report
feature which provides a listing of assets that haven't been accessed for a long period.
Once you've created the report, unused assets can be deleted either using the Bulk Delete feature or the Admin API.
Fetch expiry policy
If fetching is a common use-case on your account, we can set up an expiry policy for your fetched content. The expiry policy will determine when a fetched asset has 'expired', and expired resources can be refreshed again from the remote URL, or deleted from your account.
Since this requires manual setup on our end, it's currently only available for paid plans.
Clear or refresh backups
If much of your storage is due to backup copies of assets, you can contact our support team to delete all of your current backups, and then optionally create a fresh backup of just the currently-existing assets in your account.
It's also possible on our paid plans to store backups in an AWS S3 or Google Cloud Storage bucket managed by you, in which case the new backups won't count towards your Cloudinary account's usage: https://cloudinary.com/documentation/backups_and_version_management#overview
If there a few specific assets that should be removed from your backups, that's also possible using the Admin API
Remove or prevent duplicate assets
Cloudinary provides several options and features that can help you to identify duplicate assets for removal and avoid creating further duplicates when uploading more files. There's a specific listing of these features available in our help center: https://support.cloudinary.com/hc/en-us/articles/207441825-How-can-Cloudinary-help-me-to-avoid-or-detect-duplicated-uploads-in-my-account
Comments
2 comments
Hi, How can implement item "6. Refresh Backup" ?
Hi, for safety reasons this can only be done from our side. Please open a support ticket and we'll be happy to assist you with that.
Please sign in to leave a comment.