Skip to content
Corex

WebpRegenerator

Corex\Media\WebpRegenerator · class · Add-ons layer

Plans WebP regeneration for existing uploads (spec 061): given a list of attachment items it decides, per item, whether to convert, skip (already has a WebP sibling), or skip (unsupported type / conversion disabled). Pure — no WordPress, no filesystem writes — so it is fully unit- tested; the {@see MediaCommand} supplies the items and performs the actual conversions. Each input item: array{id:int, path:string, mime:string, webp_exists:bool}. Each planned action: array{id:int, path:string, mime:string, action:‘convert’|‘skip-exists’|‘skip-unsupported’}.

__construct(ImageCapability $capability, MediaSettings $settings)

Section titled “__construct(ImageCapability $capability, MediaSettings $settings)”