Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tinify/tinify-nodejs
Node.js client for the Tinify API.
https://github.com/tinify/tinify-nodejs
compression image-processing node-js npm-package tinyjpg tinypng
Last synced: 3 days ago
JSON representation
Node.js client for the Tinify API.
- Host: GitHub
- URL: https://github.com/tinify/tinify-nodejs
- Owner: tinify
- License: mit
- Created: 2015-07-08T12:33:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-14T11:59:18.000Z (11 months ago)
- Last Synced: 2025-01-11T13:07:26.754Z (10 days ago)
- Topics: compression, image-processing, node-js, npm-package, tinyjpg, tinypng
- Language: JavaScript
- Homepage: https://tinypng.com/developers
- Size: 133 KB
- Stars: 428
- Watchers: 9
- Forks: 74
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/tinify/tinify-nodejs)
# Tinify API client for Node.js
Node.js client for the Tinify API, used for [TinyPNG](https://tinypng.com) and [TinyJPG](https://tinyjpg.com). Tinify compresses your images intelligently. Read more at [http://tinify.com](http://tinify.com).
## Documentation
[Go to the documentation for the Node.js client](https://tinypng.com/developers/reference/nodejs).
## Installation
Install the API client:
```
npm install tinify
```Or add this to your `package.json`:
```json
{
"dependencies": {
"tinify": "*"
}
}
```## Usage
```javascript
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](LICENSE).