https://github.com/kraken-io/gulp-kraken
Gulp plugin to optimize all your images with the powerful Kraken.io API
https://github.com/kraken-io/gulp-kraken
gulp-plugins image-optimization
Last synced: 4 months ago
JSON representation
Gulp plugin to optimize all your images with the powerful Kraken.io API
- Host: GitHub
- URL: https://github.com/kraken-io/gulp-kraken
- Owner: kraken-io
- License: mit
- Created: 2014-09-17T12:04:55.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-09-17T21:10:39.000Z (over 2 years ago)
- Last Synced: 2025-12-20T22:30:28.822Z (5 months ago)
- Topics: gulp-plugins, image-optimization
- Language: JavaScript
- Size: 255 KB
- Stars: 20
- Watchers: 6
- Forks: 10
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-kraken
Gulp plugin to optimize all your images with the powerful [Kraken.io API](https://kraken.io)
## Installation
```
$ npm install gulp-kraken --save-dev
```
## Options
- `key` - your Kraken API Key
- `secret` - your Kraken API Secret
- `lossy` - enable/disable intelligent lossy optimization. Defaults to `true`
- `concurrency` - image processing concurrency (1 - 16). Defaults to `4`
## Example
```
const gulp = require("gulp");
const kraken = require("gulp-kraken");
//optional task to copy images to a new folder
gulp.task("copy", function () {
return gulp.src("./fixtures/*.*").pipe(gulp.dest("optimized_images"));
});
gulp.task(
"kraken",
gulp.series("copy", function () {
return gulp.src("./optimized_images/*.*").pipe(
kraken({
key: process.env.KRAKEN_API_KEY,
secret: process.env.KRAKEN_API_SECRET,
lossy: true,
concurrency: 6,
})
);
})
);
```