wp_media_import
Import media files from URLs into WordPress using WP-CLI commands. Add images or documents to your media library by providing the source URL and optional title.
Instructions
Import media from URL
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "wp_media_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the media file to import | |
| title | No | Title for the media item |