PHPackages                             mxrotha/tinypng-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. [Image &amp; Media](/categories/media)
4. /
5. mxrotha/tinypng-laravel

ActiveLibrary[Image &amp; Media](/categories/media)

mxrotha/tinypng-laravel
=======================

Tinify API support with laravel

1.0.3(6y ago)2181[1 issues](https://github.com/Ratha8/mx-tinypng-laravel/issues)MITPHPPHP &gt;=5.5.0

Since Oct 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Ratha8/mx-tinypng-laravel)[ Packagist](https://packagist.org/packages/mxrotha/tinypng-laravel)[ RSS](/packages/mxrotha-tinypng-laravel/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

TinyPNG-laravel
===============

[](#tinypng-laravel)

Tinify API support with laravel

[![Latest Version on Packagist](https://camo.githubusercontent.com/548c68c6fc1f797a2187e4f71d5927ab90dc4fe4d7fd2555d67c883727bce4cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7961736d7572752f79732d74696e6966792d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mxrotha/tinypng-laravel)

Install
-------

[](#install)

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

Add this to your config/app.php,

under "providers":

```
        mxrotha\LaravelTinify\LaravelTinifyServiceProvider::class,
```

under "aliases":

```
        'Tinify' => mxrotha\LaravelTinify\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.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~6 days

Total

3

Last Release

2378d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23624961?v=4)[Ratha8](/maintainers/Ratha8)[@Ratha8](https://github.com/Ratha8)

---

Top Contributors

[![Ratha8](https://avatars.githubusercontent.com/u/23624961?v=4)](https://github.com/Ratha8 "Ratha8 (6 commits)")

---

Tags

laraveltinypngtinify

### Embed Badge

![Health badge](/badges/mxrotha-tinypng-laravel/health.svg)

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

###  Alternatives

[creativeorange/gravatar

A Laravel Gravatar package for retrieving gravatar image URLs or checking the existance of an image.

5467.5M53](/packages/creativeorange-gravatar)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[yasmuru/ys-tinify-laravel

Tinify API support with laravel

4136.0k](/packages/yasmuru-ys-tinify-laravel)[schmitzal/tinyimg

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

16125.5k](/packages/schmitzal-tinyimg)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4719.6k5](/packages/ralphjsmit-laravel-glide)

PHPackages © 2026

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