Update a media item
update_mediaUpdate WordPress media metadata like title, alt text, caption, and description without re-uploading files.
Instructions
Update a media item's title, alt text, caption, description or attachment — without re-uploading the file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The attachment ID. | |
| post | No | Re-attach to this content ID. | |
| slug | No | URL slug. | |
| title | No | Display title. | |
| author | No | User ID of the author. | |
| caption | No | Caption shown beneath the item. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| alt_text | No | Alternative text for accessibility and SEO. | |
| description | No | Longer descriptive text. |