mailerpress/upload-campaign-image sideloads an image into WordPress’s media library so it can be referenced in campaign HTML.
url accepts either a fully-qualified remote URL or a data:image/*;base64,… data URI.
At a glance
| Ability | mailerpress/upload-campaign-image |
| Toolset | MailerPress — toolset/mailerpress |
| Group | MailerPress › Settings & Delivery |
| Requires | AcrossAI Pro, plus MailerPress active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
Email cannot embed images the way a web page can. Every image in an email is a remote reference the client fetches, which means it must be hosted somewhere reachable and stay there for as long as anybody might open the email.
That is longer than people expect — a newsletter opened two years later still requests the image.
So hosting campaign images in the site’s own media library is the right default. An image referenced from somewhere else breaks when that somewhere else changes.
The data URI option is what makes this usable from a JSON call, where no binary upload is possible — the same limitation that stops BuddyBoss media being uploaded through its abilities, solved here by encoding.
The response returns the attachment ID and the URLs for each registered size, so the campaign HTML can reference an appropriately sized version rather than the full original.
Not idempotent — each call sideloads another copy.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
url | string | Yes | A remote URL, or a data:image/*;base64,… data URI. |
What comes back
| Name | Type | What it is |
|---|---|---|
attachment_id | integer | The WordPress attachment. |
sizes | object | URLs for thumbnail, medium, large and full. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Add this image so I can use it in the campaign.
It resolves to one call:
{
"ability": "mailerpress/upload-campaign-image",
"parameters": {
"url": "https://example.com/hero.png"
}
}Worth knowing
- Email images are remote references fetched at open time, possibly years later.
- Host them on the site, not somewhere that might change.
- The data URI option works around the lack of binary upload in a JSON call.
- Not idempotent — each call sideloads another copy.
Related abilities
- MailerPress Save Campaign Content — reference it in the HTML
- MailerPress Format Campaign HTML — check the result
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category