Gathering detailed insights and metrics for vite-plugin-imagemin
Gathering detailed insights and metrics for vite-plugin-imagemin
npm install vite-plugin-imagemin
Typescript
Module System
Node Version
NPM Version
63.5
Supply Chain
48.2
Quality
68.3
Maintenance
50
Vulnerability
95.3
License
TypeScript (88.22%)
Vue (5.7%)
Shell (3.66%)
HTML (2.41%)
Total Downloads
2,284,134
Last Day
1,742
Last Week
10,261
Last Month
55,236
Last Year
755,098
227 Stars
44 Commits
30 Forks
3 Watching
1 Branches
5 Contributors
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
-36.2%
1,742
Compared to previous day
Last week
-31.9%
10,261
Compared to previous week
Last month
-8.4%
55,236
Compared to previous month
Last year
-3%
755,098
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
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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
28 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
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