Package Exports
- gulp-kraken
- gulp-kraken/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-kraken) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-kraken
Gulp plugin to optimize all your images with the powerful Kraken.io API
Installation
$ npm install gulp-kraken --save-dev
Options
key
- your Kraken API Keysecret
- your Kraken API Secretlossy
- enable/disable intelligent lossy optimization. Defaults totrue
concurrency
- image processing concurrency (1 - 16). Defaults to4
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,
})
);
})
);