WebP Source Optimization
Learn how version 1.1.0 safely recompresses uploaded WebP source files when smaller.
WebP source optimization is the main format expansion in version 1.1.0.
Why it is different
JPEG and PNG optimization creates a separate WebP derivative. A WebP upload is already the target format, so Vacuum can optimize the source file itself. That makes backup safety more important.
Safety rules
- A backup is created before replacement when backups are enabled.
- A temporary optimized candidate is generated first.
- The source is replaced only when the candidate is smaller.
- Metadata records
_vacimg_webp_source_optimizedwhen savings are achieved. - Restore can copy the backup over the source and clear optimization metadata.
When it skips
WebP source optimization skips when WebP read or write support is unavailable, the source is unreadable, the file is excluded, or the optimized candidate is not smaller.
Replacement safety
Before replacing an uploaded WebP source, Vacuum verifies that a backup exists and contains the original bytes. It replaces the source only when the recompressed candidate is smaller and publishes the candidate atomically. Older backups remain available if the source is optimized again later.