Gathering detailed insights and metrics for imagemin-optipng
Gathering detailed insights and metrics for imagemin-optipng
Gathering detailed insights and metrics for imagemin-optipng
Gathering detailed insights and metrics for imagemin-optipng
npm install imagemin-optipng
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
164 Stars
79 Commits
36 Forks
9 Watching
1 Branches
8 Contributors
Updated on 20 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-12%
96,873
Compared to previous day
Last week
-6.8%
503,657
Compared to previous week
Last month
8.1%
2,221,574
Compared to previous month
Last year
-21.3%
26,521,350
Compared to previous year
3
Imagemin plugin for OptiPNG
$ npm install imagemin-optipng
1const imagemin = require('imagemin'); 2const imageminOptipng = require('imagemin-optipng'); 3 4(async () => { 5 await imagemin(['images/*.png'], { 6 destination: 'build/images', 7 plugins: [ 8 imageminOptipng() 9 ] 10 }); 11 12 console.log('Images optimized!'); 13})();
Returns a Promise<Buffer>
.
Type: object
Type: number
Default: 3
Select an optimization level between 0
and 7
.
The optimization level 0 enables a set of optimization operations that require minimal effort. There will be no changes to image attributes like bit depth or color type, and no recompression of existing IDAT datastreams. The optimization level 1 enables a single IDAT compression trial. The trial chosen is what. OptiPNG thinks it’s probably the most effective. The optimization levels 2 and higher enable multiple IDAT compression trials; the higher the level, the more trials.
Level and trials:
Type: boolean
Default: true
Apply bit depth reduction.
Type: boolean
Default: true
Apply color type reduction.
Type: boolean
Default: true
Apply palette reduction.
Type: boolean | undefined | null
Default: false
Enable Adam7 PNG interlacing on any images that are processed. Interlaced images look better when they're loaded partially, but usually interlace makes compression less efficient. Set to undefined
or null
to keep the same interlacing as the input image.
Type: boolean
Default: true
A reasonable amount of effort will be spent to try to recover as much data as possible of a broken image, but the success cannot generally be guaranteed.
Type: Buffer
Buffer to optimize.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 4/30 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
dependency not pinned by hash detected -- score normalized to 0
Details
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
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
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