Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

image-min

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-min

Minify GIF, JPEG and PNG images

Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
143
-3.38%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

extract

FAQs

Package last updated on 03 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts