image-min
Minify GIF, JPEG and PNG images
Last updated 6 years ago by kevva .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install image-min 
SYNC missed versions from official npm registry.

image-min Build Status

Minify GIF, JPEG and PNG images seamlessly with Node.js.

Install

npm install --save image-min

Usage

var fs = require('fs');
var imagemin = require('image-min');
var path = require('path');

var src = fs.createReadStream('img.gif');
var ext = path.extname(src.path);

src
    .pipe(imagemin({ ext: ext }))
    .pipe(fs.createWriteStream('img-minified' + ext));

API

imagemin(opts)

Optimize a GIF, JPEG, or PNG image by providing a an ext. Use the options below (optionally) to configure how your images are optimized.

Options

ext

Type String
Default: undefined

File extension used by imagemin to determine which optimizer to use.

interlaced (GIF only)

Type: Boolean
Default: false

Interlace gif for progressive rendering.

pngquant (PNG only)

Type: Boolean
Default: false

Whether to enable pngquant lossy compression.

progressive (JPEG only)

Type: Boolean
Default: false

Lossless conversion to progressive.

Used by

License

MIT License © Kevin Mårtensson

Current Tags

  • 0.3.2                                ...           latest (6 years ago)

16 Versions

  • 0.3.2                                ...           6 years ago
  • 0.4.5                                ...           6 years ago
  • 0.4.4                                ...           6 years ago
  • 0.4.2                                ...           6 years ago
  • 0.4.1                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.3                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 38
Last Month 209
Dependencies (7)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |