Skip to content

Stock Images

EMCP Tools uses Openverse, the WordPress.org-backed Creative Commons image search, as its stock image source. No API key required (100 req/day anonymous limit, plenty for normal use).

Searches Openverse by keyword.

Input:

  • query: search terms
  • page_size: results per page, max 20 (default 10)
  • license: cc0, by, by-sa, etc. Defaults to all CC licenses.

Returns: array of { id, title, url, thumbnail, license, creator, source }.

Capability: edit_posts.

Downloads an external image URL into the WordPress Media Library as an attachment.

Input:

  • url: external image URL (must be HTTPS, must be an image MIME type)
  • title: optional, defaults to filename
  • alt: optional, accessibility text

Returns: { attachment_id, url }.

Capability: upload_files.

The composite tool: searches Openverse, sideloads the first matching result, and adds an image widget to a page. One call instead of three.

Input:

  • query: search terms
  • post_id: target page
  • parent_id: container to add the widget to
  • position: child index, -1 to append
  • license: optional, defaults to all CC

Returns: { element_id, attachment_id, image_url, attribution }.

Capability: edit_posts + upload_files + ownership check.

add-stock-image is the convenient path for the AI when it just needs “an image for this hero section.” But sometimes you want the search results without inserting anything (let the AI pick from a list), or you want to sideload a specific external image URL the user provided. The three separate tools cover all three workflows without compromising any of them.

Creative Commons licenses generally require attribution. add-stock-image returns the attribution string but does not automatically add it to the page. That’s the AI’s call based on the prompt. If the AI is building a portfolio page or anywhere attribution matters, ask it to add a small credit caption next to the image.

Wide search queries return better images than narrow ones. “Bakery interior” beats “warm artisan French boulangerie storefront with wooden door at sunset”. Openverse’s index doesn’t have the latter.