30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

MailerPress Upload Campaign Image

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

Abilitymailerpress/upload-campaign-image
ToolsetMailerPress — toolset/mailerpress
GroupMailerPress › Settings & Delivery
RequiresAcrossAI Pro, plus MailerPress active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI 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

NameTypeRequiredWhat it is
urlstringYesA remote URL, or a data:image/*;base64,… data URI.

What comes back

NameTypeWhat it is
attachment_idintegerThe WordPress attachment.
sizesobjectURLs for thumbnail, medium, large and full.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading