https://github.com/tinify/tinify-ruby
Ruby client for the Tinify API.
https://github.com/tinify/tinify-ruby
gem image-compression image-optimization rails ruby tinyjpg tinypng
Last synced: 2 months ago
JSON representation
Ruby client for the Tinify API.
- Host: GitHub
- URL: https://github.com/tinify/tinify-ruby
- Owner: tinify
- License: mit
- Created: 2015-05-15T13:45:52.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-03-19T08:49:02.000Z (4 months ago)
- Last Synced: 2025-03-31T09:11:11.304Z (4 months ago)
- Topics: gem, image-compression, image-optimization, rails, ruby, tinyjpg, tinypng
- Language: Ruby
- Homepage: https://tinypng.com/developers
- Size: 307 KB
- Stars: 41
- Watchers: 6
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://rubygems.org/gems/tinify)
[ ](https://github.com/tinify/tinify-java/blob/main/LICENSE)
[](https://github.com/tinify/tinify-ruby/actions/workflows/ci-cd.yaml)# Tinify API client for Ruby
Ruby 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 Ruby client](https://tinypng.com/developers/reference/ruby).
## Installation
Install the API client:
```
gem install tinify
```Or add this line to your application's Gemfile:
```ruby
gem "tinify"
```## Usage
```ruby
require "tinify"
Tinify.key = "YOUR_API_KEY"Tinify.from_file("unoptimized.png").to_file("optimized.png")
```## Running tests
```
bundle install
rake
```### Integration tests
```
bundle install
TINIFY_KEY=$YOUR_API_KEY rake integration
```## License
This software is licensed under the MIT License. [View the license](LICENSE).