Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 902 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 902 Bytes

grunt-imageoptim

The companion Grunt plugin for ImageOptim-CLI, which automates batch optimisation of images with ImageOptim, ImageAlpha and JPEGmini for Mac.

Installation

From the root of your project, run

npm install grunt-imageoptim --save-dev

Example Gruntfile.js

In future versions we plan to fully support Grunt's file pattern matching. Until then only processing of directories is supported (as opposed to arbitrary collections of files).

module.exports = function(grunt) {
  grunt.initConfig({
    imageoptim: {
      files: ['public/image-directory'],
      options: {
        jpegMini: false,
        imageAlpha: false,
        quitAfter: false
      }
    }
  });
  grunt.loadNpmTasks('grunt-imageoptim');
};