Reduce PNG + JPG images with teenypng and gulp
Install with npm
$ npm install --save-dev gulp-teenypng
"use strict";
var gulp, teenypng;
gulp = require('gulp');
teenypng = require('gulp-teenypng');
gulp.task('default', function () {
gulp.src('src/image.png')
.pipe(teenypng({ "apikey": "XXXXXXXXXX" }))
.pipe(gulp.dest('dist'));
});
apikey
: Developer API key from tinypng.com (required)
Published under the MIT License.