Generate missing next-gen versions 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 →

Generate missing next-gen versions

Destructive
Imagify Content & Tools imagify/generate-missing-nextgen

Queues generation of missing WebP/AVIF versions for every already-optimized image on the site.

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 queues background generation of missing next-gen (WebP/AVIF) versions for all already-optimized media, across both the WordPress media library and custom folders, by delegating to Bulk::run_generate_nextgen() — the same routine used by WP-CLI's GenerateMissingNextgenCommand and the admin's 'missing next-gen' bulk action. Like bulk-optimize, it is gated by a credit-consumption guard: calling it without confirm=true returns confirmation_required together with a preview of how many images are missing a next-gen version, and it needs a follow-up call with confirm: true to actually queue the job (or insufficient_quota/invalid_api_key if the account can't support it). On success it reports how many images were queued; if there was nothing to generate it still reports 'scheduled' with a queued_count of 0.

See it in action

You ask your AI assistant

"Generate the missing WebP and AVIF versions for all my optimized images."

Inputs

Name Type Required Description
confirm boolean No Set to true to execute after reviewing the credit-consumption preview returned by a prior call without this flag. Defaults to false.

Returns

An object with 'status' (scheduled, error, confirmation_required, insufficient_quota, or invalid_api_key), 'queued_count' (integer number of images queued for next-gen generation), and 'error_message' (null on success).

Permission

The current user must have the WordPress 'manage_options' capability (checked directly via current_user_can(), not routed through Imagify's capability abstraction).

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.