{
"data": {
"id": "https://cdn.buttercms.com/AbCdEf123XyZ",
"media_id": 12345,
"name": "hero-image.webp"
},
"webhook": {
"event": "media.updated",
"target": "https://yourapp.com/webhooks/buttercms"
}
}Media events
Media updated
Triggered when a media file is edited, replaced, or restored. The cdn_url stays the same while the file behind it changes.
WEBHOOK
media-updated
{
"data": {
"id": "https://cdn.buttercms.com/AbCdEf123XyZ",
"media_id": 12345,
"name": "hero-image.webp"
},
"webhook": {
"event": "media.updated",
"target": "https://yourapp.com/webhooks/buttercms"
}
}Triggered when the file behind an existing media asset changes.
This event fires when:
- An image is edited with the built-in image editor (crop, rotate, circle)
- A media file is replaced with a new file
- A media file is restored to its original version
cdn_url does not change when this happens. Pages that reference it
start serving the new file without any other signal, so subscribe to this
event if you rebuild a static site or purge a cache when content changes.
Editing an image from a content field, a page’s media field, or a blog
post’s featured image creates a new media asset and leaves the original
one untouched, so it does not fire this event.Was this page helpful?