Grunt Responsive Images

Responsive Images are here!

The browser vendors have decided!

The picture element is the winner!

Now all you have to do is implement responsive images on your site. And generate hundreds of images at small, medium and large resolutions.

Never fear! This site will help you with both!

Installation

This plugin requires Grunt ~0.4.0.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-responsive-images --save-dev

You also need to install either GraphicsMagick or Imagemagick CLI tools.

Installing GraphicsMagick (Recommended)

If you're a Mac user and have Homebrew installed, simply type:

brew install GraphicsMagick

Otherwise, please visit the GraphicsMagick downloads page.

Or installing ImageMagick

If you're a Mac user and have Homebrew installed, simply type:

brew install ImageMagick

Otherwise, please visit the ImageMagick downloads page.

Once both the plugin and graphics engine have been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-responsive-images');

Documentation

Please see the project readme file for information on how to use the plugin.

Screencast

Need a walkthrough?

Examples

srcset Test

My Wedding Day

PictureFill Test