PHPackages                             locomotivemtl/charcoal-contrib-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. [Image &amp; Media](/categories/media)
4. /
5. locomotivemtl/charcoal-contrib-tinify

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

locomotivemtl/charcoal-contrib-tinify
=====================================

Charcoal service provider for optimizing JPG and PNG assets.

0.1.3.2(4y ago)01001MITPHPPHP &gt;=5.6.0 || &gt;=7.0CI failing

Since Feb 25Pushed 4y ago13 watchersCompare

[ Source](https://github.com/locomotivemtl/charcoal-contrib-tinify)[ Packagist](https://packagist.org/packages/locomotivemtl/charcoal-contrib-tinify)[ Docs](https://locomotivemtl.github.io/charcoal-contrib-tinify/)[ RSS](/packages/locomotivemtl-charcoal-contrib-tinify/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (8)Used By (0)

Charcoal Tinify
===============

[](#charcoal-tinify)

[![License](https://camo.githubusercontent.com/347fdbdfab125b1f12eee2e682fe82f54a54927df8848d0786a6c225c0b40493/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d74696e6966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-tinify)[![Latest Stable Version](https://camo.githubusercontent.com/323472d166df491d1cb9c6d8e3614aae64eb6524d73bce1885f25b18c2f5c093/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d74696e6966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-tinify)[![Code Quality](https://camo.githubusercontent.com/bf412af10084fb6a883c01f18fd31ba674d672120ffed3765134054a66b00207/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d74696e6966792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/locomotivemtl/charcoal-contrib-tinify/)[![Coverage Status](https://camo.githubusercontent.com/e82f065397cb2973647aefa1e8390dde47710d0989112eae65c168fea2c59aec/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d74696e6966792e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/locomotivemtl/charcoal-contrib-tinify)[![Build Status](https://camo.githubusercontent.com/dab0ee447d3e874cc477f6c949a83d8def86d4a44d50d5c91c25e6ac89a31540/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d74696e6966792e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/locomotivemtl/charcoal-contrib-tinify)

A [Charcoal](https://packagist.org/packages/locomotivemtl/charcoal-app) module to add tinify integration to charcoal.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
    - [Dependencies](#dependencies)
- [Configuration](#configuration)
- [Usage](#usage)
- [Development](#development)
    - [API Documentation](#api-documentation)
    - [Development Dependencies](#development-dependencies)
    - [Coding Style](#coding-style)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

The preferred (and only supported) method is with Composer:

```
$ composer require locomotivemtl/charcoal-contrib-tinify
```

### Dependencies

[](#dependencies)

#### Required

[](#required)

- [**PHP 5.6+**](https://php.net): *PHP 7* is recommended.
- [**locomotivemtl/charcoal-admin**](https://github.com/locomotivemtl/charcoal-admin) ^0.14.1
- [**tinify/tinify**](https://github.com/tinify/tinify-php) ^1.5

#### PSR

[](#psr)

- [**PSR-7**](https://www.php-fig.org/psr/psr-7/): Common interface for HTTP messages. Fulfilled by Slim.
- [**PSR-11**](https://www.php-fig.org/psr/psr-11/): Common interface for dependency containers. Fulfilled by Pimple.

Configuration
-------------

[](#configuration)

In your project's config file, require the tinify module like so :

```
{
    "modules": {
        "charcoal/tinify/tinify": {}
    }
}
```

Define an API key, preferably in the admin.json config file since it's use is only required in the cms. You can generate a key at

```
{
    "apis": {
        "tinify": {
            "key": "3FYkvsXPt7VlZbwHsMnHvmZg2g9jW8dJ"
        }
    }
}
```

Usage
-----

[](#usage)

This contrib adds a menu item to the CMS system menu [![Example](exemple-1.png?raw=true "Example")](exemple-1.png?raw=true)

**TODO**

- Add a script to schedule compressions task via cron.

Development
-----------

[](#development)

To install the development environment:

```
$ composer install
```

To run the scripts (phplint, phpcs, and phpunit):

```
$ composer test
```

### API Documentation

[](#api-documentation)

- The auto-generated `phpDocumentor` API documentation is available at:

- The auto-generated `apigen` API documentation is available at:
    [https://codedoc.pub/locomotivemtl/charcoal-contrib-tinify/master/](https://codedoc.pub/locomotivemtl/charcoal-contrib-tinify/master/index.html)

### Development Dependencies

[](#development-dependencies)

- \[php-coveralls/php-coveralls\]\[phpcov\]
- \[phpunit/phpunit\]\[phpunit\]
- \[squizlabs/php\_codesniffer\]\[phpcs\]

### Coding Style

[](#coding-style)

The charcoal-contrib-tinify module follows the Charcoal coding-style:

- [*PSR-1*](https://www.php-fig.org/psr/psr-1/)
- [*PSR-2*](https://www.php-fig.org/psr/psr-2/)
- [*PSR-4*](https://www.php-fig.org/psr/psr-4/), autoloading is therefore provided by *Composer*.
- [*phpDocumentor*](http://phpdoc.org/) comments.
- [phpcs.xml.dist](phpcs.xml.dist) and [.editorconfig](.editorconfig) for coding standards.

> Coding style validation / enforcement can be performed with `composer phpcs`. An auto-fixer is also available with `composer phpcbf`.

Credits
-------

[](#credits)

- [Joel Alphonso](https://github.com/JoelAlphonso)
- [Locomotive](https://locomotive.ca/)

License
-------

[](#license)

Charcoal is licensed under the MIT license. See [LICENSE](LICENSE) for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.9% 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 ~150 days

Recently: every ~213 days

Total

7

Last Release

1730d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3f29e38395113e2400bdd7e51bea982b17f120d4d5a53d4473b53118ee46f8d?d=identicon)[JoelAlphonso](/maintainers/JoelAlphonso)

---

Top Contributors

[![JoelAlphonso](https://avatars.githubusercontent.com/u/10762266?v=4)](https://github.com/JoelAlphonso "JoelAlphonso (37 commits)")[![BeneRoch](https://avatars.githubusercontent.com/u/3017380?v=4)](https://github.com/BeneRoch "BeneRoch (2 commits)")

---

Tags

charcoal

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[spacecatninja/imager-x

Ninja powered image transforms.

29390.0k23](/packages/spacecatninja-imager-x)[ambroisemaupate/intervention-request

A customizable Intervention Image wrapper to use image simple re-sampling features over urls and a configurable cache.

4242.4k2](/packages/ambroisemaupate-intervention-request)[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)
