PHPackages                             tinify/tinify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tinify/tinify

ActiveLibrary[API Development](/categories/api)

tinify/tinify
=============

PHP client for the Tinify API. Tinify compresses your images intelligently. Read more at https://tinify.com.

1.6.4(5mo ago)2515.2M—9.4%53[4 PRs](https://github.com/tinify/tinify-php/pulls)20MITPHPPHP &gt;=5.3.0CI passing

Since Jul 8Pushed 1mo ago15 watchersCompare

[ Source](https://github.com/tinify/tinify-php)[ Packagist](https://packagist.org/packages/tinify/tinify)[ Docs](https://tinify.com/developers)[ RSS](/packages/tinify-tinify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (20)Used By (20)

[![MIT License](https://camo.githubusercontent.com/505fe3a551fc6e64816f64cee81471b04e7ef943170e4f994c249982b3fd4290/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667) ](https://github.com/tinify/tinify-php/blob/main/LICENSE)[![CI_CD](https://github.com/tinify/tinify-php/actions/workflows/ci-cd.yaml/badge.svg?branch=master)](https://github.com/tinify/tinify-php/actions/workflows/ci-cd.yaml)[![Packagist Version](https://camo.githubusercontent.com/f465d0871cde33370dde705667785a53497cc43e4ad5ffd9f699fa383ae43ffe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74696e6966792f74696e696679)](https://packagist.org/packages/tinify/tinify)[![Packagist PHP Version Support](https://camo.githubusercontent.com/b687902fba80ecce18af5631d717e4fb7a050c9c6d23749e4bd193fe7bb01977/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f74696e6966792f74696e696679)](https://packagist.org/packages/tinify/tinify)

Tinify API client for PHP
=========================

[](#tinify-api-client-for-php)

PHP client for the Tinify API, used for [TinyPNG](https://tinypng.com) and [TinyJPG](https://tinyjpg.com). Tinify compresses your images intelligently. Read more at .

Documentation
-------------

[](#documentation)

[Go to the documentation for the PHP client](https://tinypng.com/developers/reference/php).

Installation
------------

[](#installation)

Install the API client with Composer. Add this to your `composer.json`:

```
{
  "require": {
    "tinify/tinify": "*"
  }
}
```

Then install with:

```
composer install

```

Use autoloading to make the client available in PHP:

```
require_once("vendor/autoload.php");
```

Usage
-----

[](#usage)

```
Tinify\setKey("YOUR_API_KEY");
Tinify\fromFile("unoptimized.png")->toFile("optimized.png");
```

Running tests
-------------

[](#running-tests)

```
composer install
vendor/bin/phpunit

```

### Integration tests

[](#integration-tests)

```
composer install
TINIFY_KEY=$YOUR_API_KEY vendor/bin/phpunit --no-configuration test/integration.php

```

License
-------

[](#license)

This software is licensed under the MIT License. [View the license](LICENSE).

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance82

Actively maintained with recent releases

Popularity63

Solid adoption and visibility

Community40

Growing community involvement

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 61.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~253 days

Recently: every ~293 days

Total

16

Last Release

159d ago

Major Versions

0.9.1 → 1.1.02015-08-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/939ff1539f12a7b07ffea69bd6d1654bd226877154315a564686106c0aed6b2c?d=identicon)[tinify](/maintainers/tinify)

---

Top Contributors

[![rolftimmermans](https://avatars.githubusercontent.com/u/78237?v=4)](https://github.com/rolftimmermans "rolftimmermans (58 commits)")[![rkoopmans](https://avatars.githubusercontent.com/u/1124992?v=4)](https://github.com/rkoopmans "rkoopmans (25 commits)")[![tijmenbruggeman](https://avatars.githubusercontent.com/u/3340902?v=4)](https://github.com/tijmenbruggeman "tijmenbruggeman (3 commits)")[![jovanmaric](https://avatars.githubusercontent.com/u/3003740?v=4)](https://github.com/jovanmaric "jovanmaric (2 commits)")[![michielverkoijen](https://avatars.githubusercontent.com/u/5121595?v=4)](https://github.com/michielverkoijen "michielverkoijen (2 commits)")[![yektaturan](https://avatars.githubusercontent.com/u/110455697?v=4)](https://github.com/yektaturan "yektaturan (1 commits)")[![momala454](https://avatars.githubusercontent.com/u/83005?v=4)](https://github.com/momala454 "momala454 (1 commits)")[![phpfui](https://avatars.githubusercontent.com/u/7434059?v=4)](https://github.com/phpfui "phpfui (1 commits)")[![eddyh](https://avatars.githubusercontent.com/u/106653587?v=4)](https://github.com/eddyh "eddyh (1 commits)")

---

Tags

image-compressionimage-optimizationphptinifytinify-apitinyjpgtinypngapicompressimagestinypngtinyjpgtinify

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tinify-tinify/health.svg)

```
[![Health](https://phpackages.com/badges/tinify-tinify/health.svg)](https://phpackages.com/packages/tinify-tinify)
```

###  Alternatives

[tinify/magento2

Make your web shop faster by compressing your JPEG and PNG images. This plugin automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG.

4345.8k](/packages/tinify-magento2)[shortpixel/shortpixel-php

ShortPixel PHP SDK. Read more at https://shortpixel.com/api-tools

37531.5k10](/packages/shortpixel-shortpixel-php)[corsinvest/cv4pve-api-php

Corsinvest Proxmox VE Client API PHP

801.4M](/packages/corsinvest-cv4pve-api-php)[glooby/pexels

Pexels API Client for www.pexels.com

2731.6k1](/packages/glooby-pexels)[xchimx/laravel-unsplash

Laravel package for easy integration with the Unsplash API. It allows you to use the Unsplash API in your Laravel applications to fetch photos, collections, and user data.

246.6k](/packages/xchimx-laravel-unsplash)[armorpayments/armorpayments-php

A PHP client library for interacting with the Armor Payments API

153.9k](/packages/armorpayments-armorpayments-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
