adluxe-grunt-tinyimg
Optimize PNG, JPEG & SVG images. Copy GIF as-is.
Last updated 2 years ago by adluxe .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install adluxe-grunt-tinyimg 
SYNC missed versions from official npm registry.

grunt-tinyimg

About

Optimize PNG, JPEG, SVG images with grunt task. This plugin uses pngquant for png images, mozjpeg for jpegs and svgo for svg files. Inspired by grunt-pngmin.

The reason this plugin is created is because most image optimization plugins either don't compress images decently or are terribly slow in doing so. The intention is to have a fast compression plugin without bells and whistles.

Install

$ npm install --save-dev grunt-tinyimg

Usage

This is an example of gruntfile.js.

module.exports = function (grunt) {
  grunt.initConfig({
    tinyimg: {
      static: {
        files: { 
          'dist/img.png': 'src/img.png',
          'dist/img.jpg': 'src/img.jpg',
          'dist/img.svg': 'src/img.svg'
        }
      },
      dynamic: {
        files: [{
          expand: true,
          cwd: 'src/', 
          src: ['**/*.{png,jpg,svg}'],
          dest: 'dist/'
        }]
      }
    }
  });

  grunt.loadNpmTasks('grunt-tinyimg:100:256');
};

License

MIT

Current Tags

  • 1.1.2                                ...           latest (2 years ago)

12 Versions

  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |