Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
imagemin-giflossy
Advanced tools
giflossy imagemin plugin
$ npm install --save imagemin-giflossy
const imagemin = require('imagemin');
const imageminGiflossy = require('imagemin-giflossy');
imagemin(['images/*.gif'], 'build/images', {use: [imageminGiflossy({lossy: 80})]}).then(() => {
console.log('Images optimized');
});
Returns a promise for a buffer.
Type: boolean
Default: false
Interlace gif for progressive rendering.
Type: number
Default: 1
Select an optimization level between 1
and 3
.
The optimization level determines how much optimization is done; higher levels take longer, but may have better results.
Type: number
Reduce the number of distinct colors in each output GIF to num or less. Num must be between 2 and 256.
Type: Number
Default: undefined
Order pixel patterns to create smaller GIFs at cost of artifacts and noise.
Adjust lossy argument to quality you want (30 is very light compression, 200 is heavy).
It works best when only little loss is introduced, and due to limitation of the compression algorithm very high loss levels won't give as much gain.
e.g.:
imageminGiflossy({ lossy: 80 });
Type: string
Default: undefined
Resize the output GIF to widthxheight.
e.g.:
imageminGiflossy({ resize: '300x200' });
Type: boolean
Default: false
Sets the output logical screen to the size of the largest output frame.
e.g.:
imageminGiflossy({ noLogicalScreen: true });
Type: string
Default: mix
Set the method used to resize images.
e.g.:
imageminGiflossy({ resizeMethod: 'sample' });
Type: string
Default: diversity
Determine how a smaller colormap is chosen.
e.g.:
imageminGiflossy({ colorMethod: 'blend-diversity' });
Type: string
Default: 1
Optimize output GIF animations for space.
There are currently three levels:
1
: Stores only the changed portion of each image. This is the default.2
: Also uses transparency to shrink the file further.3
: Try several optimization methods (usually slower, sometimes better results).Other optimization flags provide finer-grained control.
keep-empty
: Preserve empty transparent frames (they are dropped by default).e.g.:
imageminGiflossy({ optimize: '3' });
Type: boolean
Default: false
Unoptimize GIF animations into an easy-to-edit form.
e.g.:
imageminGiflossy({ unoptimize: true });
Type: buffer
Buffer to optimize.
MIT © imagemin
FAQs
giflossy imagemin plugin
The npm package imagemin-giflossy receives a total of 3,200 weekly downloads. As such, imagemin-giflossy popularity was classified as popular.
We found that imagemin-giflossy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.