Frontend Delivery
Serve generated WebP or AVIF files on the frontend while preserving original fallback behavior.
Frontend Delivery lets visitors receive generated modern formats when available. It is disabled by default for existing installations during upgrade; enable it from Compression settings after reviewing the readiness state.
Delivery model
Vacuum uses wp_get_attachment_image_attributes and wp_calculate_image_srcset with the attachment ID and exact source file. After a successful optimization pass, it can generate WebP and AVIF derivatives for the full image and each registered WordPress size. Each srcset candidate is resolved independently, so a full-size derivative is never reused for a smaller candidate.
The resolver validates readability, image structure, source hash, and output size before returning a URL. It never converts an image during anonymous frontend rendering.
Preferred format
| Preference | Behavior |
|---|---|
| Auto | Prefer AVIF when available, then WebP, then original. |
| AVIF | Prefer AVIF with original fallback. |
| WebP | Prefer WebP with original fallback. |
Browser and cache negotiation
Auto delivery prefers AVIF, then WebP, then the original image according to the browser Accept header. The response sends Vary: Accept so page caches and CDNs can keep negotiated output separate. Purge affected caches after enabling delivery or regenerating derivatives; Vacuum does not purge third-party caches automatically.
Safety
Stored media URLs in post content are not permanently rewritten. Missing, stale, unreadable, invalid, or oversized derivatives fall back to the original WordPress image immediately. If frontend delivery is disabled, normal original output returns without cleanup or a database migration.
Responsive derivatives are validated against the upload-owned source and the expected MIME type and dimensions. Concurrent requests use per-output locks, and repeated metadata updates preserve valid files and registry timestamps instead of regenerating them.