AI Abilities is a Premium Addons for Elementor feature that connects AI clients such as Claude, Cursor, and Codex to your WordPress site through a built-in MCP server. Each ability is one action the connected AI can perform on your site. This doc covers one of the Media abilities: Upload Image to Media Library.
Upload Image to Media Library takes a public image URL, downloads the file into your WordPress media library, and returns the new attachment’s ID and URL for a Build ability to place. It runs only after you have approved the upload.
This is how an image that is not yet on your site gets there. Point the AI at an image URL, and once you approve, the file comes in as a real attachment you can reuse anywhere on the site afterward.
At a Glance
| Category | Media |
| Access | Write |
| Destructive | No |
| MCP tool name | premium-addons/upload-media |
| Available since | Premium Addons v4.11.87 |
Before You Start
This ability is part of the AI Abilities feature. If you have not set it up yet, follow the Elementor AI Abilities (MCP Tools) Tutorial first to enable the feature and connect your AI client. The ability must also be switched on under Premium Addons → AI Abilities & MCP Config, in the Media category:
Use Cases
Bring in a generated image. The AI finds or creates a hero image, you approve it, and this ability downloads it into your library and hands the attachment straight to premium-addons/insert-widget.
Add an image by URL. Give it a link to a picture you have the rights to use; after your go-ahead, the AI stores it and places it in the section it is building.
Import once, reuse everywhere. Because a source URL is only ever stored once, asking for the same asset across several pages reuses the one attachment instead of filling the library with copies.
Good to Know
- Nothing downloads until you approve it. The call carries a
consentflag that must be exactly true; without it the ability stops and asks first. - The source has to be a public http(s) URL. Local, private, and internal addresses are turned away, on the first request and on every redirect it follows.
- Images only, up to 5 MB. The type is read from the file’s contents rather than its extension, so a mislabeled file is caught. SVG is not supported.
- A URL is stored once. A repeat call returns the attachment already saved for it, marked
reused, instead of adding a copy. Any new alt text or title you pass is still applied. - Pass good
alttext. It is saved on the attachment and describes the image for accessibility and SEO. - The connected WordPress user must be allowed to upload files (the
upload_filescapability).
Inputs
| Parameter | Required | Description |
|---|---|---|
source_url | Yes | The public http(s) URL of the image to download. Private, loopback, and internal addresses are rejected. |
consent | Yes | Must be true. Confirms you approved adding this file to your media library. The AI should never set it without asking you first. |
filename | No | The name to store the image under, with its extension. Derived from the URL when omitted. |
alt | No | Alt text stored on the new attachment. Describe what the image shows. |
title | No | The attachment title. Taken from the filename when omitted. |
Output
| Field | Description |
|---|---|
id | The attachment ID. Pair it with the url as a media control value in insert-widget or update-element-settings. |
url | The full-size image URL on your site. |
width | Full-size width in pixels (0 when the file carries no dimensions). |
height | Full-size height in pixels (0 when the file carries no dimensions). |
mime_type | The stored MIME type. |
alt | The alt text stored on the attachment. |
reused | True when the URL was already in the library, so the existing attachment came back instead of a fresh download. |
Come & Join the Community
Feel free to join our Facebook group and subscribe to our YouTube channel to keep up with our newest features, improvements, and helpful video tutorials.