Nutritious Polygonal Meatball
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

gulp-responsive-images

0.0.3 • Public • Published

gulp-responsive-images

A simple Gulp plugin that allows the resizing and renaming of images, primarily for responsive applications. It uses GraphicsMagick to allow simple resizing, cropping, quality control and more.

Install

Install with npm.

npm install --save-dev gulp-responsive-images

GraphicsMagick

gulp-responsive-images requires GraphicsMagick to function. Installation is simple:

Ubuntu:

apt-get install graphicsmagick

Mac OS X (using Homebrew):

brew install graphicsmagick

Example

var gulp = require('gulp');
var responsive = require('gulp-responsive-images');
 
gulp.task('default', function () {
  gulp.src('source/images/**/*')
    .pipe(responsive({
      'hero.png': [{
        width: 100,
        suffix: '-100'
      }, {
        width: 100 * 2,
        suffix: '-100-2x'
      }],
      '*.png': [{
        width: 600,
        crop: true
      }]
    }))
    .pipe(gulp.dest('dist/images'));
});

Keywords

none

install

npm i gulp-responsive-images

Downloadsweekly downloads

24

version

0.0.3

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar