Update plugin settings is a WordPress ability from Imagify — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Update plugin settings
WriteUpdates one or more Imagify configuration options, leaving unspecified settings unchanged.
Requires the Imagify plugin on WordPress 6.9+ for the Abilities API (abilities are registered only when the wp_register_ability() function exists). Most abilities are gated by the Imagify 'manage' capability, resolved through Imagify's own capability abstraction (honors the imagify_capacity filter and multisite network-admin logic; equivalent to manage_options by default); the bulk-optimize, generate-missing-nextgen, and restore-media abilities instead check the WordPress 'manage_options' capability directly.
What it does
This ability accepts a partial settings object and updates only the keys supplied — covering the API key, optimization level and lossless mode, auto-optimize-on-upload, backup retention, large-image resizing, next-gen (WebP/AVIF) delivery method and format, CDN URL, per-size optimization exclusions, admin bar visibility, and partner link display. Constrained values (like optimization_level or optimization_format) are validated and rejected with an error if invalid; unknown keys are rejected outright; and api_key cannot be changed if the IMAGIFY_API_KEY constant is defined in wp-config.php. Use this to reconfigure Imagify programmatically — for example switching the next-gen output format to AVIF or turning on auto-optimize — without opening the settings screen.
See it in action
You ask your AI assistant
"Turn on auto-optimize for new uploads and switch the next-gen image format to AVIF."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| api_key | string | No | Imagify API key. Cannot be updated when the IMAGIFY_API_KEY constant is defined. |
| optimization_level | integer | No | Optimization aggressiveness: 0 = normal, 1 = aggressive, 2 = ultra. |
| lossless | integer | No | Enable lossless compression (0 = off, 1 = on). |
| auto_optimize | integer | No | Automatically optimize images on upload (0 = off, 1 = on). |
| backup | integer | No | Keep a backup of original images (0 = off, 1 = on). |
| resize_larger | integer | No | Resize images wider than resize_larger_w (0 = off, 1 = on). |
| resize_larger_w | integer | No | Maximum image width in pixels when resize_larger is enabled. |
| display_nextgen | integer | No | Serve next-gen images to supported browsers (0 = off, 1 = on). |
| display_nextgen_method | string | No | Delivery method for next-gen images: 'picture' element or URL 'rewrite'. |
| display_webp | integer | No | Serve WebP images to supported browsers (0 = off, 1 = on). |
| display_webp_method | string | No | Delivery method for WebP images: 'picture' element or URL 'rewrite'. |
| cdn_url | string | No | CDN base URL for serving optimized images. |
| disallowed-sizes | object | No | Image sizes excluded from optimization, keyed by size slug. |
| admin_bar_menu | integer | No | Show the Imagify entry in the WordPress admin bar (0 = off, 1 = on). |
| partner_links | integer | No | Show partner links in the Imagify admin area (0 = off, 1 = on). |
| convert_to_avif | integer | No | Convert images to AVIF format (0 = off, 1 = on). |
| convert_to_webp | integer | No | Convert images to WebP format (0 = off, 1 = on). |
| optimization_format | string | No | Output format for optimized images: 'off', 'webp', or 'avif'. |
Returns
An object with 'updated' (array of setting keys whose values actually changed) and 'settings' (the full post-update settings object, excluding api_key and version).
Permission
The current user must have the Imagify 'manage' capability.
More Imagify abilities
Bulk optimize
Schedules a bulk image-optimization run across the WordPress media library or Imagify's custom folders.
Generate missing next-gen versions
Queues generation of missing WebP/AVIF versions for every already-optimized image on the site.
Get account status
Reports the connected Imagify account's plan, quota consumption, and API key validity.
Get media optimization status
Retrieves the optimization status and size metrics for a single media library attachment.
Get next-gen format coverage
Reports how many optimized images are still missing a next-gen (WebP/AVIF) version and which next-gen format is configured.
Get optimization statistics
Returns aggregate optimization savings for both WordPress media and custom (non-Media-Library) folders.