Get a media item
get_mediaFetch a media item by ID to retrieve its source URL, dimensions, generated sizes, alt text, and attachment location. Provides complete metadata for the specified attachment.
Instructions
Fetch one media item by ID, including its source URL, dimensions, generated sizes, alt text and where it is attached.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The attachment ID. | |
| 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. |