media_optimize_attachment
Optimize a single WordPress media attachment, replacing the original file in uploads while keeping a backup based on the retention setting.
Instructions
Optimize one attachment now. The optimized file replaces the original in uploads; a backup of the original is kept per the retention setting.
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": {
"site": "<site>",
"id": "<id>"
},
"name": "media_optimize_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Attachment id | |
| site | Yes | Site id (see list_sites) |