Upload an image from a URL
elementor_upload_imageDownloads a remote image into the WordPress media library and returns the attachment ID, URL, and a value ready for Elementor image controls, which require library attachments rather than remote URLs.
Instructions
Download a remote image into the WordPress media library and return the attachment id and URL, plus a ready-made value for an Elementor image control. Use this before setting any image setting — Elementor image controls want a library attachment, not a remote 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": "elementor_upload_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute http(s) URL of the image to fetch. | |
| site | No | Configured site name. Omit to use the default site. | |
| title | No | ||
| altText | No | Alt text. Worth setting for accessibility and SEO. | |
| attachToPostId | No | Attach the upload to this post. |