List media
list_mediaList WordPress media library items with filters for search, type, date, and author. Paginate results to find specific attachments or audit missing alt text.
Instructions
List items in the media library with search, type filtering, date filtering and pagination.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Which page of results to return. | |
| after | No | Uploaded after this ISO 8601 date. | |
| order | No | Sort direction. | desc |
| author | No | User ID of the author. | |
| before | No | Uploaded before this ISO 8601 date. | |
| parent | No | Only attachments attached to this content ID. | |
| search | No | Match against title, caption, alt text and filename. | |
| orderby | No | Which field to sort by. | date |
| 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. | |
| per_page | No | How many results per page. | |
| mime_type | No | Filter by exact MIME type, e.g. "image/png". | |
| media_type | No | Filter by broad media type. | |
| missing_alt_text | No | Return only images with empty alt text — useful for an accessibility or SEO sweep. Filters within the requested page, so walk every page (or use audit_media) for a complete list. |