Update image alt text
wp_update_alt_textSet or update an image's alt text in the WordPress Media Library, and when given a post ID with AI Site Auditor active, sync the same text to every matching in that post.
Instructions
Sets alt text for an image. With post_id and AI Site Auditor active, it updates both the Media Library and every of that image inside the post content; otherwise only the Media Library. Describe what the image shows and why it matters on the page, under 125 characters, without 'image of'. Set decorative for purely decorative images (empty alt).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"attachment_id": "<attachment_id>"
},
"name": "wp_update_alt_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_id | No | Page or post where the image is used | |
| alt_text | No | ||
| decorative | No | ||
| attachment_id | Yes | Media Library image ID |