Appearance
Updating Image Metadata
What is Image Metadata
Image metadata is additional information stored with your images - alt text, categories, tags, and custom fields like product IDs or user information.
Problem with S3 Metadata
S3 object metadata is immutable. Once uploaded, you cannot change it without re-uploading the entire file. This makes it difficult to:
- Update product information as it changes
- Improve alt text for accessibility
- Add tags or categories as content evolves
- Track moderation status for user-generated content
Saving Metadata with Icefiery
When saving images, include metadata in the request:
bash
curl -X POST \
-H "X-API-Key: YOUR_PRIVATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"temporaryImageUrl": "...",
"metadata": {
"alt": "Product photo",
"productId": "prod_123",
}
}' \
https://api.icefiery.com/api/v1/save-temporary-image
Updating Existing Metadata
Update metadata anytime without re-uploading:
bash
curl -X POST \
-H "X-API-Key: YOUR_PRIVATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://cdn.icefiery.com/res/img_abc123.png",
"addMetadata": {
"alt": "Updated product photo"
}
}' \
https://api.icefiery.com/api/v1/update-image-metadata
Metadata Limitations
Structure
- Metadata is stored as a flat key-value object
- No nested values or arrays are supported
Key Requirements
- Maximum length: 30 characters
- Allowed characters: lowercase letters (a-z), numbers (0-9), and underscores (_)
- Must start with a letter
- Example valid keys:
product_id
,alt_text
,category_1
Value Requirements
- Maximum length: 100 characters
- Can contain any UTF-8 characters
- Example valid values: "user_abc123", "Blue cotton t-shirt", "Product photo showing front view"
Quantity Limits
- Maximum 10 keys per image
These limitations ensure optimal performance and storage efficiency. If you need to store more complex data structures or longer values, consider using a separate database or storage solution.
Contact us with your use case if you need relaxed limits.
See also
- API reference:
POST /api/v1/upload-temporary-image/{uploadKey}
- API reference:
POST /api/v1/update-image-metadata