Minify compatible files using TinyPNG's API
npm install --save-dev gulp-tinify
var gulp = require('gulp');
var tinify = require('gulp-tinify');
gulp.task('tinify', function() {
gulp.src('/img/**/*')
.pipe(tinify('TinyPNGAPIKey'))
.pipe(gulp.dest('/dest/img'));
});
You must have a TinyPNG Developer API Key for this to work.
MIT © Josh Broton