JSPM

gulp-kraken

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 33
  • Score
    100M100P100Q63965F
  • License MIT

Gulp plugin to optimize all your images with the powerful Kraken.io API

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 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,
            })
        );
    })
);