PHPackages                             jyim/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. [API Development](/categories/api)
4. /
5. jyim/tinify-laravel

ActiveLibrary[API Development](/categories/api)

jyim/tinify-laravel
===================

Tinify API support with laravel

010PHP

Since Aug 31Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Tinify-laravel
==============

[](#tinify-laravel)

Tinify API support with laravel

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

Install
-------

[](#install)

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

Add this to your config/app.php,

under "providers":

```
        yasmuru\LaravelTinify\LaravelTinifyServiceProvider::class,
```

under "aliases":

```
        'Tinify' => yasmuru\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

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/206428f195ff30eadf98614f63041df52fb5b17cca7a6cae08516b680b83bea5?d=identicon)[augdai](/maintainers/augdai)

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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