PHPackages                             jjarroyo/tinify-laravel - 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. jjarroyo/tinify-laravel

ActiveLibrary

jjarroyo/tinify-laravel
=======================

Tinify API support with laravel (TinyPNG)

1.0(3y ago)016MITPHPPHP &gt;=7.2.0

Since Jan 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jjarroyo/tinyfy-laravel)[ Packagist](https://packagist.org/packages/jjarroyo/tinify-laravel)[ RSS](/packages/jjarroyo-tinify-laravel/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Tinify Laravel 7+ Client
========================

[](#tinify-laravel-7-client)

Tinify API support for Laravel 7+

Install
-------

[](#install)

```
$ composer require jjarroyo/tinify-laravel
```

Add this to your config/app.php,

under "providers":

```
JJArroyo\TinifyLaravel\TinifyLaravelServiceProvider::class,
```

under "aliases":

```
'Tinify' => JJArroyo\TinifyLaravel\Facades\Tinify::class
```

And set a env variable `TINIFY_APIKEY` with your TinyPNG API key.

If you want to directly upload the image to `aws s3`, you need set the env variables of following with your aws s3 credentials.

```
S3_KEY=
S3_SECRET=
S3_REGION=
S3_BUCKET=
```

Examples
--------

[](#examples)

```
$result = Tinify::fromFile('\path\to\file');

$result = Tinify::fromBuffer($source_data);

$result = Tinify::fromUrl($image_url);

/** To save as File **/
$result->toFile('\path\to\save');

/** To get image as data **/
$data = $result->toBuffer();
```

```
$s3_result = Tinify::fileToS3('\path\to\file', $s3_bucket_name, '/path/to/save/in/bucket');

$s3_result = Tinify::bufferToS3($source_data, $s3_bucket_name, '/path/to/save/in/bucket');

$s3_result = Tinify::urlToS3($image_url, $s3_bucket_name, '/path/to/save/in/bucket');

/** To get the url of saved image **/
$s3_image_url = $s3_result->location();
$s3_image_width = $s3_result->width();
$s3_image_hight = $s3_result->height();
```

`NOTE:` All the images directly save to s3 is publicably readable. And you can set permissions for s3 bucket folder in your aws console to make sure the privacy of images.

tinyfy-laravel
==============

[](#tinyfy-laravel)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1223d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fd2d6a1d8b6dfd9ed4fa195356339e0c84bd0243edf6bd60cba168aaeed3930?d=identicon)[jjarroyo](/maintainers/jjarroyo)

---

Top Contributors

[![jjarroyo](https://avatars.githubusercontent.com/u/5465462?v=4)](https://github.com/jjarroyo "jjarroyo (13 commits)")

---

Tags

clientlaraveltinypngtinify

### Embed Badge

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

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

###  Alternatives

[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[yasmuru/ys-tinify-laravel

Tinify API support with laravel

4136.0k](/packages/yasmuru-ys-tinify-laravel)[codedredd/laravel-soap

A SoapClient wrapper integration for Laravel

221516.6k3](/packages/codedredd-laravel-soap)[schmitzal/tinyimg

Image compression for all pngs and jpgs uploaded to the backend (using the tinypng API)

16125.5k](/packages/schmitzal-tinyimg)

PHPackages © 2026

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