Skip to content
Corex

WebpResetCommand

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

wp corex media reset-webp (spec 062): safely remove CoreX-generated WebP derivatives. It deletes ONLY files tracked in a _corex_webp record (so it never removes originals, manually-uploaded WebP, or any untracked file), clears the record afterwards, supports --dry-run, and reports scanned/deleted/skipped/ failed counts. The same tracked-only deletion runs on delete_attachment via {@see forgetAttachment()}.

Delete the tracked derivative for one attachment (called on delete_attachment).

The generated-WebP path to delete from a tracked record — or null when the record is missing, has no generated path, or that path is not a .webp (so only CoreX-generated WebP is ever targeted). Pure.