Generate responsive images with clown car technique


Generate responsive images with clown car technique

This plugin requires Grunt ~0.4.1 and GraphicsMagick to be installed.

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:

Install GraphicsMagick on OSX:

brew install graphicsmagick
npm install grunt-clowncar --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


In your project's Gruntfile, add a section named clowncar to the data object passed into grunt.initConfig().

  clowncar: {
    options: {
      size: [1000, 800, 600, 400]
    , quality: 75
    your_target: {
      files: {
        "dist/images/content/grunt.svg": 'images/content/grunt.jpg'

Type: Array Default value: [600, 400]

Images with width as specified in the array to be generated

Type: Number Default value: 90

Quality of the image to be generated

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

  • 2013-08-05 v0.0.1 Inital release