# gulp-tinypng-plugin

> tinypng图片压缩工具，支持多个Key，支持已压缩图片缓存。gulp plugin to compress png images using tinypng api

Latest version **1.0.7** (published 2018-01-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-tinypng-plugin
pnpm add gulp-tinypng-plugin
yarn add gulp-tinypng-plugin
bun add gulp-tinypng-plugin
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2018-01-16 |
| First published | 2017-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 8 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | ZhelinCheng |
| Maintainers | zhelin |
| Keywords | gulpplugin, tinypng, image, img, picture, photo, minify, minifier, compress, png |

## Links

- npm: https://www.npmjs.com/package/gulp-tinypng-plugin
- Repository: https://github.com/ZhelinCheng/gulp-tinypng-plugin
- Homepage: https://github.com/ZhelinCheng/gulp-tinypng-plugin#readme
- Issues: https://github.com/ZhelinCheng/gulp-tinypng-plugin/issues
- npm.io page: https://npm.io/package/gulp-tinypng-plugin

## Dependencies (8)

- [gulp](https://npm.io/package/gulp.md) ^3.3.4
- [rmdir](https://npm.io/package/rmdir.md) ^1.0.4
- [vinyl](https://npm.io/package/vinyl.md) ^0.2.3
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.3.5
- [request](https://npm.io/package/request.md) ^2.31.0
- [through2](https://npm.io/package/through2.md) ^0.4.2
- [gulp-util](https://npm.io/package/gulp-util.md) ^2.2.20
- [event-stream](https://npm.io/package/event-stream.md) ^3.1.7

## 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

- 1.0.7 (latest) — 2018-01-16
- 1.0.5 — 2017-11-28
- 1.0.4 — 2017-11-28
- 1.0.2 — 2017-10-18
- 0.1.2 — 2017-10-17
- 0.1.1 — 2017-10-17
- 0.1.0 — 2017-10-17

## README

# [gulp](https://github.com/ZhelinCheng/gulp-tinypng-plugin)-tinypng-plugin

该插件增加了缓存功能，设置为`cache : true`，同时支持多个Key。

> Minify PNG  using [tinypng](https://tinypng.com/)
> Reference resources [gulp-tinypng](https://github.com/creativeaura/gulp-tinypng)

## Install

Install with [npm](https://npmjs.org/package/gulp-tinypng-plugin)

```bash
npm install --save-dev gulp-tinypng-plugin
```

## Example

```js
var gulp = require('gulp');
var tinypng = require('gulp-tinypng');

gulp.task('tinypng', function () {
    gulp.src('src/**/*.png')
        .pipe(tinypng({
            //key : 'API_KEY'
            key : ['API_KEY1', 'API_KEY2'，'...'],
            cache : true
        }))
        .pipe(gulp.dest('compressed_images'));
});
```

### tinypng(options)

`key`: API_KEY(String || Array)

`cache`: Open cache

## License

MIT

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