Skip to content
Vacuum Image Optimizer1.0.1
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

  1. Resolve attachment ID and source path.
  2. Detect actual MIME type.
  3. Apply exclusions and source support checks.
  4. Confirm readable source file.
  5. Create or verify backup when needed.
  6. Choose WebP or AVIF engine.
  7. Generate derivative or optimize WebP source.
  8. Compare output size and save only valid improvements.
  9. Store metadata and derivative links.
  10. 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