ghost_set_feature_image
Uploads an image and assigns it as the feature image of a post or page, with optional alt text and caption, all in a single call.
Instructions
Uploads an image and assigns it as the feature image of a post or page (with optional alt text and caption) in one call. Accepts the same imageUrl/imagePath/imageBase64 input modes as ghost_upload_image. Returns the updated resource. If the update fails after the upload, the error response includes the orphaned image URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| imageUrl | No | The publicly accessible URL of the image to download and upload. | |
| imagePath | No | Absolute path to a local image file. Only accepted when the GHOST_MCP_IMAGE_ROOT env var is set; paths must resolve inside that root. | |
| imageBase64 | No | Base64-encoded image bytes (with or without data: URI prefix). Decoded size capped at 5MB to respect MCP transport limits. Requires mimeType. | |
| mimeType | No | MIME type for imageBase64 input (e.g. image/png, image/jpeg, image/svg+xml). Required when imageBase64 is used. | |
| alt | No | Alt text for the image. If omitted, a default will be generated from the filename. | |
| purpose | No | Intended use. Ghost validates format/size per purpose (icon/profile_image must be square; icon also accepts ICO). | |
| ref | No | Caller-supplied identifier (e.g. original filename). Ghost echoes it back in the response. | |
| type | Yes | Which resource to attach the feature image to. | |
| id | Yes | ID of the post or page. | |
| caption | No | Optional HTML caption for the feature image (max 5000 chars). |