Upload WordPress Media
wordpress_upload_mediaDestructive
Upload an image into a WordPress site's media library from a public URL, optionally setting it as a post's featured image in the same call.
If the user has the picture on their own computer, call upload_image first to turn it into a public URL, then pass that URL here. Set post_id together with featured=true to make it the featured image of that post or page, which is what Elementor loop grids and most themes display on cards. Always give alt text: it is what screen readers and search engines read.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | ||
| url | Yes | ||
| title | No | ||
| post_id | No | ||
| featured | No | ||
| filename | No | ||
| site_url | No |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||