BrowserUX Image Optimize
Automatically optimize your images for faster load times and maximum performance.
BrowserUX Image Optimize is a configurable Vite plugin that generates
.avif and .webp versions of your images before build, then intelligently compresses all JPG, PNG, SVG, AVIF and WebP files after build.
With a simple configuration, you control quality, target formats, and exclusions. Perfect for reducing asset weight in
production without visible quality loss, and boosting your Lighthouse performance scores.
npm install vite-plugin-image-optimize
Plugin for Vite
See the CHANGELOG
Key Features of BrowserUX Image Optimize
- 🖼️ Generates
.avifand.webpfrom.jpg/.pngin/public/img - 🚀 Optimizes images in
/dist/img(JPG, PNG, SVG, WebP, AVIF) - ⚡ Parallel processing with
Promise.allfor fast builds - 🔁 Skips pre-build generation when output is already up to date
- 🔍 Supports glob-based file exclusion
- 🔧 Configurable quality settings per format
- 📦 Optionally logs detailed per-file compression stats
- 🛠️ Powered by sharp and svgo