vite-plugin-imagemin weekly downloads statistics
By anncwb (3 listings) · npm · Vite plugins
A vite plugin for compressing image assets
vite-plugin-imagemin has 20,475 recorded weekly downloads on npm, an increase of 19.0% over the past 30 days, ranking #1031 of 3,247 tracked listings.
About vite-plugin-imagemin
vite-plugin-imagemin
English | 中文
A vite plugin for compressing image assets
Install (yarn or npm)
node version: >=12.0.0
vite version: >=2.0.0
yarn add vite-plugin-imagemin -D
or
npm i vite-plugin-imagemin -D
China installation note
Because imagemin is not easy to install in China. Several solutions are now available
- Use yarn to configure in package.json (recommended)
"resolutions": {
"bin-wrapper": "npm:bin-wrapper-china"
},
- Use npm, add the following configuration to the computer host file
199.232.4.133 raw.githubusercontent.com
- Install with cnpm (not recommended)
Usage
- Configuration plugin in vite.config.ts
import viteImagemin from 'vite-plugin-imagemin';
export default () => {
return {
plugins: [
viteImagemin({
gifsicle: {
optimizationLevel: 7,
interlaced: false,
},
optipng: {
optimizationLevel: 7,
},
mozjpeg: {
quality: 20,
},
pngquant: {
quality: [0.8, 0.9],
speed: 4,
},
svgo: {
plugins: [
{
name: 'removeViewBox',
},
{
name: 'removeEmptyAttrs',
active: false,
},
],
},
}),
],
};
};
Options
| params | type | default | default |
|---|---|---|---|
| verbose | boolean | true | Whether to output the compressed result in the console |
| filter | RegExp or (file: string) => boolean | - | Specify which resources are not compressed |
| disable | boolean | false | Whether to disable |
| svgo | object or false | - | See Options |
| gifsicle | object or false | - | See Options |
| mozjpeg | object or false | - | See Options |
| optipng | object or false | - | See Options |
| pngquant | object or false | - | See Options |
| webp | object or false | - | See Options |
Example
Run Example
cd ./example
yarn install
yarn build
Sample project
License
MIT
Inspiration
Description from the npm listing.
- vite
- vite-plugin
- imagemin
- vben
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (591)Similar npm Vite plugins plugins
All 20 vite-plugin-imagemin alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/vite-plugin-imagemin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.