Get WordPress Media Item
wp_get_media_itemGet full metadata for a media item by ID, including dimensions, file size, MIME type, alt text, caption, and source URL.
Instructions
Fetch a single media item by ID. Returns full metadata including dimensions, file size, MIME type, alt text, caption, and source URL.
Args:
id (number): Numeric media item ID.
response_format (enum): markdown | json. Default 'markdown'.
Returns: A single WPMediaItem object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Numeric media item ID. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |