Gathering detailed insights and metrics for vite-plugin-imagemin
Gathering detailed insights and metrics for vite-plugin-imagemin
Gathering detailed insights and metrics for vite-plugin-imagemin
Gathering detailed insights and metrics for vite-plugin-imagemin
vite-plugin-compression
Use gzip or brotli to compress resources.
@vheemstra/vite-plugin-imagemin
A vite plugin for compressing image assets
@leelen_npm/vite-plugin-imagemin
A vite plugin for compressing image assets
unplugin-imagemin
📦 📦 unplugin compression Image Compression plugin based on squoosh and svgo
A vite plugin for compressing image assets.
npm install vite-plugin-imagemin
Typescript
Module System
Node Version
NPM Version
61.3
Supply Chain
48
Quality
68.2
Maintenance
50
Vulnerability
95.6
License
TypeScript (88.22%)
Vue (5.7%)
Shell (3.66%)
HTML (2.41%)
Total Downloads
2,539,146
Last Day
613
Last Week
13,577
Last Month
57,532
Last Year
740,856
MIT License
247 Stars
44 Commits
31 Forks
3 Watchers
1 Branches
5 Contributors
Updated on Jul 01, 2025
Minified
Minified + Gzipped
Latest Version
0.6.1
Package Id
vite-plugin-imagemin@0.6.1
Unpacked Size
19.97 kB
Size
4.41 kB
File Count
5
NPM Version
8.1.2
Node Version
16.13.2
Cumulative downloads
Total Downloads
Last Day
-0.2%
613
Compared to previous day
Last Week
-1.1%
13,577
Compared to previous week
Last Month
-7%
57,532
Compared to previous month
Last Year
-9.6%
740,856
Compared to previous year
23
1
5
English | 中文
A vite plugin for compressing image assets
node version: >=12.0.0
vite version: >=2.0.0
yarn add vite-plugin-imagemin -D
or
npm i vite-plugin-imagemin -D
Because imagemin is not easy to install in China. Several solutions are now available
1"resolutions": { 2 "bin-wrapper": "npm:bin-wrapper-china" 3 }, 4
1 2199.232.4.133 raw.githubusercontent.com
1import viteImagemin from 'vite-plugin-imagemin' 2 3export default () => { 4 return { 5 plugins: [ 6 viteImagemin({ 7 gifsicle: { 8 optimizationLevel: 7, 9 interlaced: false, 10 }, 11 optipng: { 12 optimizationLevel: 7, 13 }, 14 mozjpeg: { 15 quality: 20, 16 }, 17 pngquant: { 18 quality: [0.8, 0.9], 19 speed: 4, 20 }, 21 svgo: { 22 plugins: [ 23 { 24 name: 'removeViewBox', 25 }, 26 { 27 name: 'removeEmptyAttrs', 28 active: false, 29 }, 30 ], 31 }, 32 }), 33 ], 34 } 35}
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 |
Run Example
1 2npm run dev:play 3npm run dev:build 4
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/24 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More