PHPackages                             mirko-pagliai/php-thumber - 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. mirko-pagliai/php-thumber

AbandonedArchivedLibrary

mirko-pagliai/php-thumber
=========================

A PHP library to generate thumbnails

1.6.2(2y ago)327.1k21MITPHPPHP &gt;=8.1

Since Oct 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mirko-pagliai/php-thumber)[ Packagist](https://packagist.org/packages/mirko-pagliai/php-thumber)[ Docs](https://github.com/mirko-pagliai/php-thumber)[ RSS](/packages/mirko-pagliai-php-thumber/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (6)Versions (28)Used By (1)

php-thumber
===========

[](#php-thumber)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![CI](https://github.com/mirko-pagliai/php-thumber/actions/workflows/ci.yml/badge.svg)](https://github.com/mirko-pagliai/php-thumber/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/8990012ebd1032cc47ecd89c99c7defdf26054f565aac0443cf0d79841496189/68747470733a2f2f636f6465636f762e696f2f67682f6d69726b6f2d7061676c6961692f7068702d7468756d6265722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/mirko-pagliai/php-thumber)[![Codacy Badge](https://camo.githubusercontent.com/f24baa9415b4df5bab0766c7b2e8dc96fcc2aa795247b5a94c3e19b372f471d3/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6166616464303163323965313431643238623232353439633033306262376635)](https://www.codacy.com/app/mirko.pagliai/php-thumber?utm_source=github.com&utm_medium=referral&utm_content=mirko-pagliai/php-thumber&utm_campaign=Badge_Grade)[![CodeFactor](https://camo.githubusercontent.com/652e1555ebc32df3a899c998abd31e791833b846db38bbb381c3a09c416e784d/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6d69726b6f2d7061676c6961692f7068702d7468756d6265722f6261646765)](https://www.codefactor.io/repository/github/mirko-pagliai/php-thumber)

*php-thumber* is a PHP library for creating thumbnails on the fly and it implements a file cache for thumbnails. It uses [intervention/image](https://github.com/Intervention/image), working as wrapper.

Did you like this plugin? Its development requires a lot of time for me. Please consider the possibility of making [a donation](//paypal.me/mirkopagliai): even a coffee is enough! Thank you.

[![Make a donation](https://camo.githubusercontent.com/d9f2015fc776952b7d14005e3f0e18099924deeb096bffd93869762ebecde952/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f7765627374617469632f6d6b74672f6c6f676f2d63656e7465722f6c6f676f5f70617970616c5f63617274652e6a7067)](//paypal.me/mirkopagliai)

---

- [Requirements and supported formats](#requirements-and-supported-formats)
- [Installation and configuration](#installation-and-configuration)
    - [Installation on older PHP versions](#installation-on-older-php-versions)
        - [For PHP 7.4 or later](#for-php-74-or-later)
        - [For PHP 7.2 or later](#for-php-72-or-later)
        - [For PHP 5.6 or later](#for-php-56-or-later)
- [How to use](#how-to-use)
- [Testing](#testing)
- [Versioning](#versioning)

Requirements and supported formats
----------------------------------

[](#requirements-and-supported-formats)

*php-thumber* requires GD Library (&gt;=2.0) **or** Imagick PHP extension (&gt;=6.5.7).

It's **highly preferable** to use Imagick, because It provides better performance and a greater number of supported formats.

Supported formats may vary depending on the library used.

JPEGPNGGIFTIFBMPICOPSDGDYesYesYesNoNoNoNoImagickYesYesYesYesYesYesYesFor more information about supported format, please refer to the [Intervention Image documentation](http://image.intervention.io/getting_started/formats).

Installation and configuration
------------------------------

[](#installation-and-configuration)

You can install the plugin via composer:

```
$ composer require --prefer-dist mirko-pagliai/php-thumber
```

Therefore, before using the library, it may be necessary to configure some constants:

- `THUMBER_DRIVER`: the driver you want to use for the creation of thumbnails. Valid values are `imagick` or `gd`;
- `THUMBER_TARGET`: full path directory where to create thumbnails (so you have to create this directory and make it writable).

An example:

```
define('THUMBER_DRIVER', 'imagick');
define('THUMBER_TARGET', '/tmp/php-thumber');
```

Otherwise, you can include/require the [`config/bootstrap.php`](https://github.com/mirko-pagliai/php-thumber/blob/master/config/bootstrap.php) file, which will auto-determine the driver to use and set a temporary directory where to create thumbnails (on Unix environment, it will be `/tmp/php-thumber`).

### Installation on older PHP versions

[](#installation-on-older-php-versions)

Recent packages and the master branch require at least PHP 7.4 and the current development of the code is based on these and later versions of PHP. However, there are still some branches compatible with previous versions of PHP.

#### For PHP 7.4 or later

[](#for-php-74-or-later)

The [php7.4](//github.com/mirko-pagliai/php-thumber/tree/php7.4) branch requires at least PHP 7.4.

In this case, you can install the package as well:

```
$ composer require --prefer-dist mirko-pagliai/php-thumber:dev-php7.4
```

Note that the `php7.4` branch will no longer be updated as of January 05, 2024, except for security patches, and it matches the [1.5.5](https://github.com/mirko-pagliai/php-thumber/releases/tag/1.5.5) version.

#### For PHP 7.2 or later

[](#for-php-72-or-later)

The [php7.2](//github.com/mirko-pagliai/php-thumber/tree/php7.2) branch requires at least PHP 7.2.

In this case, you can install the package as well:

```
$ composer require --prefer-dist mirko-pagliai/php-thumber:dev-php7.2
```

Note that the `php7.2` branch will no longer be updated as of April 28, 2022, except for security patches, and it matches the [1.4.3](https://github.com/mirko-pagliai/php-thumber/releases/tag/1.4.3) version.

#### For PHP 5.6 or later

[](#for-php-56-or-later)

The [php5.6](//github.com/mirko-pagliai/php-thumber/tree/php5.6) branch requires at least PHP 5.6.

In this case, you can install the package as well:

```
$ composer require --prefer-dist mirko-pagliai/php-thumber:dev-php5.6
```

Note that the `php5.6` branch will no longer be updated as of April 22, 2021, except for security patches, and it matches the [1.2.3](https://github.com/mirko-pagliai/php-thumber/releases/tag/1.2.3) version.

How to use
----------

[](#how-to-use)

See our wiki:

- [How to use ThumbCreator and create thumbnails](https://github.com/mirko-pagliai/php-thumber/wiki/How-to-use-ThumbCreator-and-create-thumbnails).

Refer to our [API](//mirko-pagliai.github.io/php-thumber).

Testing
-------

[](#testing)

Some tests belong to the `imageEquals` group. These tests generate thubnails and compare them with pre-loaded thumbnails (inside `tests/examples/comparing_files`). By default, these tests are not performed, because the images may be different if generated from different environments and systems.

To exclude these tests, you should run:

```
vendor/bin/phpunit --exclude-group imageEquals
```

Versioning
----------

[](#versioning)

For transparency and insight into our release cycle and to maintain backward compatibility, *php-thumber* will be maintained under the [Semantic Versioning guidelines](http://semver.org).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity77

Established project with proven stability

 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 ~76 days

Recently: every ~32 days

Total

23

Last Release

732d ago

PHP version history (5 changes)1.0.0PHP &gt;=5.6

1.1.0PHP &gt;=7.1

1.2.0PHP &gt;=7.2.5

1.5.0PHP &gt;=7.4

1.6.0-RC1PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/56d4c91c4d1ce5952a13c723d4fd340f8a1220ba1ef0212bbdb9a6334c98b3b9?d=identicon)[mirko-pagliai](/maintainers/mirko-pagliai)

---

Top Contributors

[![mirko-pagliai](https://avatars.githubusercontent.com/u/293199?v=4)](https://github.com/mirko-pagliai "mirko-pagliai (297 commits)")

---

Tags

phpthumbnail-generatorthumbnails

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mirko-pagliai-php-thumber/health.svg)

```
[![Health](https://phpackages.com/badges/mirko-pagliai-php-thumber/health.svg)](https://phpackages.com/packages/mirko-pagliai-php-thumber)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.4M31](/packages/laravolt-avatar)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M73](/packages/unisharp-laravel-filemanager)[aimeos/aimeos-core

Full-featured e-commerce components for high performance online shops

4.5k346.9k48](/packages/aimeos-aimeos-core)[intervention/image-laravel

Laravel Integration of Intervention Image

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

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k22](/packages/bkwld-croppa)

PHPackages © 2026

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