Finds, uploads, and wires WordPress media into Bricks Image and file elements, with guidance on image sizes, lazy loading, and asset cleanup.
Ships in bricks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use WordPress media library attachments for assets that should live with the site. Do not hotlink production images from third-party URLs unless the user explicitly asks for remote assets.
Before uploading, search existing media:
{
"query": "hero",
"mimeType": "image/"
}
For broad searches, choose the compact response mode. Fetch full detail only when you need the exact generated size URLs for a chosen attachment. Use bricks-find-media. If the direct tool is missing, call mcp-adapter-execute-ability with ability_name: "bricks/find-media".
Prefer base64 uploads when the file is already local or generated:
{
"filename": "hero.jpg",
"base64": "<base64 file data>",
"title": "Homepage hero",
"alt": "Person using the product dashboard"
}
Base64 uploads must use a filename with a WordPress-allowed media extension and stay within the site's configured upload-size limit. Use the dedicated custom-font abilities for font files.
An SVG that fails sanitization returns upload_failed; fix the file instead of retrying it unchanged.
URL sideloading is only for normal public http/https URLs. Do not use internal, localhost, private-network, link-local, metadata-service, unsafe-port, credentialed, or file URLs. Remote downloads are also checked against the site's configured upload-size limit.
Uploads are persistent WordPress attachments. If an upload was only for temporary testing, a discarded design direction, or a replacement that should not stay in the library, delete it only after verifying it was created for this task, is still unused and cleanup is within scope. Use bricks/delete-media with the returned id as attachmentId; retain pre-existing/shared attachments.
After upload, wire the returned attachment into an Image element:
{
"name": "image",
"settings": {
"image": {
"id": 123,
"url": "https://example.com/wp-content/uploads/hero.jpg",
"filename": "hero.jpg",
"size": "large",
"full": "https://example.com/wp-content/uploads/hero.jpg"
},
"altText": "Person using the product dashboard",
"loading": "eager"
}
}
Use the sizes object returned by upload-media to choose an appropriate size and URL. Choose the image size from its rendered dimensions and available variants. Do not lazy-load an above-the-fold LCP/hero image; use lazy loading for appropriate below-fold images.
Use the native file element for a document link or download. Fetch its runtime
schema: source selects file, external, or dynamic, with different settings
for each. Put an uploaded attachment in its file control (id and url). Preserve the requested link/download behavior and verify it in
the frontend (includes/elements/file.php).
For a native gallery, fetch the image-gallery schema before writing. Gallery controls differ from a single Image element and should not be guessed.
If the page needs a carousel with arbitrary content, use slider-nested and add Image elements inside slides instead of forcing an Image Gallery.
When reproducing a page:
id, url, filename, and chosen size.srcset where expected.upload-media; use the custom-font abilities.bricks-element-schemas.For a custom SVG icon library, use list-icon-sets and list-custom-icons before
creating a set or uploading an icon. Inspect the live schemas for
create-custom-icon-set and upload-custom-icon, then wire the returned icon shape
through the target element's icon control. Server sanitization may change SVG data;
verify the resulting icon. Set deletion removes its icon rows but does not imply
attachment cleanup. Preserve other set entries and shared attachments.
Keep page-specific alternative text on the element when appropriate; changing attachment metadata can affect its other uses.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
bricks, wordpress-media, image-upload, media-library, lazy-loading
/bricks:bricks-media-assetsfrom bricks
npx claudepluginhub codeerhq/bricks-skills --plugin bricks46 skills in this plugin
/bricks-agent-repositoryHandle complex existing-site Bricks edits through advertised repository/workspace workflows when focused abilities cannot express the change./bricks-ai-tabDiagnose Bricks AI connection setup, ability toggles, dispatcher availability and disabled actions. Use for connection/availability problems./bricks-audit-design-systemAudit Bricks classes, variables, palettes and components, or carry out requested cleanup. Report-only audits do not authorize fixes.Other plugins' skills for the same job