You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Cloudinary中删除图片全量元数据?是否有对应API?

Removing All Specified Metadata Fields from Cloudinary Images (Including API Method)

Hey Shivam! Glad you asked—this is totally doable with Cloudinary's tools, and I’ll walk you through exactly how to strip out all those metadata fields you listed.

The API You Need: Update Resources API

Cloudinary’s Update Resources API is the official way to modify existing assets, including removing specific metadata fields. The star parameter here is remove_metadata, which accepts an array of the metadata keys you want to delete.

Example: Remove Metadata via cURL

Here’s a ready-to-adapt cURL command—just swap in your Cloudinary credentials and target image public IDs:

curl -X POST https://api.cloudinary.com/v1_1/your-cloud-name/image/update \
  -u your-api-key:your-api-secret \
  -d public_ids[]=your-image-public-id-1 \
  -d public_ids[]=your-image-public-id-2 \
  -d remove_metadata[]=faces \
  -d remove_metadata[]=colors \
  -d remove_metadata[]=exif \
  -d remove_metadata[]=image_metadata \
  -d remove_metadata[]=context \
  -d remove_metadata[]=pages \
  -d remove_metadata[]=phash \
  -d remove_metadata[]=coordinates

Key Details to Know:

  • Bulk Processing: Add multiple public_ids[] parameters to target dozens of images at once. Alternatively, use the prefix parameter to match all assets under a specific folder/prefix instead of listing individual IDs.
  • All Targeted Fields Supported: Every metadata type you mentioned (faces, colors, exif, image_metadata, context, pages, phash, coordinates) works with the remove_metadata parameter—this will fully erase them from Cloudinary’s record of the asset.
  • Prevent Metadata on Future Uploads: If you want to avoid saving these fields for new images, include parameters like exif=false, colors=false, faces=false, and discard_original_metadata=true in your upload API calls to skip generating/storing this data from the start.

That’s all you need! This API method is the straightforward, supported way to clean up your existing assets’ metadata.

内容的提问来源于stack exchange,提问作者Shivam Singh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 03:50:09