Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Task to optimize images via grunt
Branch: master
Pull request Compare This branch is 90 commits behind heldr:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
tasks
tests/img
.gitignore
README.md
grunt.js
package.json

README.md

grunt-smushit

Grunt task to remove unecessary bytes of PNG and JPG, it uses node-smushit

Smush.it uses optimization techniques specific to image format to remove unnecessary bytes from image files. It is a "lossless" tool, which means it optimizes the images without changing their look or visual quality.

Read more about Smush.it

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-smushit

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-smushit');

Documentation

There are 3 ways to use grunt-smushit:

Recursive path

smushit: {
    dist: 'public/images'
}

Image list

smushit: {
    dist: ['public/images/img1.png','public/images/img2.png']
}

With just a image

smushit: {
    dist: 'public/images/img1.png'
}

License

MIT License (c) Helder Santana

based on: grunt-recess

Something went wrong with that request. Please try again.