media_update_settings
Update WordPress media optimization settings such as compression, output formats, SVG uploads, and metadata handling; omitted values stay unchanged and invalid inputs are rejected.
Instructions
Update [cvrt] Media settings; omitted keys keep their value, and nothing is stored when any value is invalid. github_token is write-only: it is never returned, and a blank value keeps the stored token. To remove the token pass clear_github_token: true explicitly.
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>"
},
"name": "media_update_settings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | Site id (see list_sites) | |
| level | No | Compression level | |
| svg_roles | No | Roles allowed to upload SVG | |
| avif_speed | No | AVIF encoder speed, 0 (slow, smaller) to 10 (fast) | |
| svg_enabled | No | Allow safe SVG upload | |
| webp_method | No | WebP encoder method, 0 (fast) to 6 (slow, smaller) | |
| github_token | No | GitHub token for plugin updates. Write-only; blank keeps the stored token | |
| quality_avif | No | AVIF quality, 1..100 | |
| quality_jpeg | No | JPEG quality, 1..100 | |
| quality_webp | No | WebP quality, 1..100 | |
| max_dimension | No | Longest side in px; 0 disables resizing, otherwise 320..10000 | |
| output_format | No | webp_avif (WebP main, AVIF extra), webp, or keep (original format) | |
| keep_copyright | No | Keep the copyright field when stripping metadata | |
| strip_metadata | No | Remove EXIF and other metadata | |
| clear_github_token | No | true removes the stored GitHub token | |
| optimize_on_upload | No | Optimize new uploads in the background queue | |
| backup_retention_days | No | Days to keep backups of originals before automatic cleanup, 0..3650 | |
| remove_data_on_uninstall | No | Delete plugin data when the plugin is deleted |