Simple plugin to optimize images for web usage.
This plugin requires Grunt ~0.4.5
npm install grunt-hal-image-optimizer --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-hal-image-optimizer');
Following example optimizes images from the test folder and places thumbnail images to the given destination folder.
grunt.initConfig({
hal_image_optimizer: {
example: {
options: {
width: 200,
height: 200
},
files: {'./imgThumbs': './node_modules/hal-image-optimizer/test/test_images' }
}
}
});
Type: Integer
Default value: 100
Width of the generated image.
Type: Integer
Default value: 100
Heigth of the generated image.
The path to the destination (key), the path to the source files.
###v1.0.1:
- Corrected usage of source and destination.
###v1.0.0:
- First version.
Copyright (c) HeikkiAlanen
Licensed under the MIT license.