0.2.2 • Published 5 years ago

gulp-tinyimage v0.2.2

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

gulp-tinyimage

An image manipulation plugin for gulp. Resize, Optimise and save all your images with one simple plugin. This plugin is useful if your a developer that receives a ton of high-resolution/filesize images aswell as anything but jpg. This plugin completely removes the need for ever touching your images. gulp-tinyimage is a work in progress and isn't complete.

Features

  • Highly Configurable
  • Designed to output web friendly images

Getting Started

Install the gulp-tinyimage using NPM or your favourite node package manager

$ npm install gulp-tinyimage

Add gulp-tinyimage to your gulpfile

var gulpTinyimage = require('gulp-tinyimage');

Create a gulp task to start processing images

gulp.task('images', function(done) {
  return gulp.src( imageFiles )
    .pipe(gulpTinyimage({
      maxWidth: 1000,
      maxHeight: 800,
      quality: 70,
      maxFilesize: 400,
      outputFormat: 'jpg',
      styles: {
        small: {
          maxWidth: 600,
          quality: 75
        }
      }
    }))
    .pipe(gulp.dest( './assets/img/' ))
});

Configuration

OptionTypeDefaultDescription
maxWidthint1000Set the maximum width the image can have. It'll be resized if its over
qualityint70The compression quality of the outputted image
formatstringjpgOutputted image format
stylesobjectnullContains additional image styles
convertSvgbooltrueConvert any SVGs to your specified format
0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago