1.0.11 min read
Optimization Pipeline
Follow an attachment from eligibility checks through backup, generation, metadata, and reports.
The optimization pipeline is shared by manual actions, upload automation, and the queue.
Pipeline stages
- Resolve attachment ID and source path.
- Detect actual MIME type.
- Apply exclusions and source support checks.
- Confirm readable source file.
- Create or verify backup when needed.
- Choose WebP or AVIF engine.
- Generate derivative or optimize WebP source.
- Compare output size and save only valid improvements.
- Store metadata and derivative links.
- Update stats, reports, and Media Library status.
Failure handling
Failures update _vacimg_status and store an error message. Skipped files receive explicit skip reasons so admins can distinguish unsupported media from actual errors.
Metadata-first reporting
Reports read attachment metadata rather than rescanning every generated file on each page load. This keeps admin pages responsive on larger libraries.
Related articles
Supported FormatsReview supported source formats, skipped formats, and output behavior for WebP and AVIF.Backup SystemUnderstand backup paths, metadata, retention, cleanup, and restore-safe source handling.Queue SystemReview scan, enqueue, process, retry, state, batch size, and failure handling in the queue.