gulp-teenypng

Minify images with TinyPNG

Usage no npm install needed!

<script type="module">
  import gulpTeenypng from 'https://cdn.skypack.dev/gulp-teenypng';
</script>

README

gulp-teenypng

Reduce PNG + JPG images with teenypng and gulp

Install

Install with npm

$ npm install --save-dev gulp-teenypng

Example

"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'));
});

Settings

  • apikey: Developer API key from tinypng.com (required)

Published under the MIT License.