# imagemin-gifsicle

> Imagemin plugin for Gifsicle

Latest version **7.0.0** (published 2020-01-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install imagemin-gifsicle
pnpm add imagemin-gifsicle
yarn add imagemin-gifsicle
bun add imagemin-gifsicle
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2020-01-21 |
| First published | 2014-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/imagemin-gifsicle) |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 117 |
| Maintainers | 1000ch, bradbaris, kevva, nothingismagick, shinnn, sindresorhus, xhmikosr |
| Keywords | compress, gif, gifsicle, gulpplugin, image, imageminplugin, img, minify, optimize |

## Links

- npm: https://www.npmjs.com/package/imagemin-gifsicle
- Repository: https://github.com/imagemin/imagemin-gifsicle
- Homepage: https://github.com/imagemin/imagemin-gifsicle#readme
- Issues: https://github.com/imagemin/imagemin-gifsicle/issues
- Funding: https://github.com/imagemin/imagemin-gifsicle?sponsor=1
- npm.io page: https://npm.io/package/imagemin-gifsicle

## Dependencies (3)

- [execa](https://npm.io/package/execa.md) ^1.0.0
- [is-gif](https://npm.io/package/is-gif.md) ^3.0.0
- [gifsicle](https://npm.io/package/gifsicle.md) ^5.0.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 7.0.0 (latest) — 2020-01-21
- 6.0.1 — 2018-11-02
- 6.0.0 — 2018-10-31
- 5.2.0 — 2017-07-13
- 5.1.0 — 2016-05-25
- 5.0.1 — 2016-05-18
- 5.0.0 — 2016-04-29
- 4.2.0 — 2015-06-07
- 4.1.0 — 2015-01-20
- 4.0.0 — 2014-10-24
- 3.1.0 — 2014-10-21
- 3.0.0 — 2014-10-20
- 2.0.1 — 2014-10-17
- 2.0.0 — 2014-09-10
- 1.0.0 — 2014-08-21
- … 2 more at https://npm.io/package/imagemin-gifsicle/versions

## README

# imagemin-gifsicle [![Build Status](https://travis-ci.org/imagemin/imagemin-gifsicle.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-gifsicle)

> Imagemin plugin for [Gifsicle](https://www.lcdf.org/gifsicle/)

## Install

```
$ npm install imagemin-gifsicle
```

## Usage

```js
const imagemin = require('imagemin');
const imageminGifsicle = require('imagemin-gifsicle');

(async () => {
	await imagemin(['images/*.gif'], 'build/images', {
		use: [
			imageminGifsicle()
		]
	});

	console.log('Images optimized');
})();
```

## API

### imageminGifsicle(options?)(buffer)

Returns a `Promise<Buffer>` with the optimized image.

#### options

Type: `object`

##### interlaced

Type: `boolean`\
Default: `false`

Interlace gif for progressive rendering.

##### optimizationLevel

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.

1. Stores only the changed portion of each image.
2. Also uses transparency to shrink the file further.
3. Try several optimization methods (usually slower, sometimes better results)

##### colors

Type: `number`

Reduce the number of distinct colors in each output GIF to num or less. Num must be between 2 and 256.

#### buffer

Type: `Buffer`

Buffer to optimize.

---
_Source: https://npm.io/package/imagemin-gifsicle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
