• Stars
    star
    403
  • Rank 106,766 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Node.js client for the Tinify API.

Build Status

Tinify API client for Node.js

Node.js client for the Tinify API, used for TinyPNG and TinyJPG. Tinify compresses your images intelligently. Read more at http://tinify.com.

Documentation

Go to the documentation for the Node.js client.

Installation

Install the API client:

npm install tinify

Or add this to your package.json:

{
  "dependencies": {
    "tinify": "*"
  }
}

Usage

const tinify = require("tinify");
tinify.key = "YOUR_API_KEY";

tinify.fromFile("unoptimized.png").toFile("optimized.png");

Running tests

npm install
npm test

Integration tests

npm install
TINIFY_KEY=$YOUR_API_KEY npm run integration

License

This software is licensed under the MIT License. View the license.