0.1.2 • Published 8 years ago

shrink-img v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

shrink-img

NPM version Dependency Status devDependency Status License

Installation

    npm install shrink-img

Usage

    const shrink = require('shrink-img');

    // Pass in a directory. It will recursively compress all png,jpg,gif images under this folder.
    // !! This will replace your original images, do back up if you needed.
    shrink('FolderPath', 'yourTinyPngAPIKey');
    shrink('.', 'ZgPDOUKtFZgPIiDOKtR');

You need to have a tinyPng API key before compress images. Go to apply: https://tinypng.com/developers