Get optimization statistics 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 →

Get optimization statistics

Read-only

Returns aggregate optimization savings for both WordPress media and custom (non-Media-Library) folders.

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 returns site-wide optimization statistics split into two groups: 'wp' (images optimized through the WordPress Media Library) and 'custom-folders' (images optimized from Imagify's custom folder feature). For each group it reports the count of optimized files, the count of files that errored, the total original and optimized size in bytes, and the overall savings percentage. Use it to summarize the impact Imagify has had on a site's image weight, or to check whether a bulk optimization run produced meaningful savings.

See it in action

You ask your AI assistant

"How much space has Imagify saved across my media library and custom folders?"

Returns

An object with 'wp' and 'custom-folders' sub-objects, each containing 'count_optimized', 'count_errors', 'original_size', 'optimized_size' (bytes), and 'savings_percent'.

Permission

The current user must have the Imagify 'manage' capability.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.