PHPackages                             tbetool/img-thumbnail-generator - 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. tbetool/img-thumbnail-generator

ActiveLibrary

tbetool/img-thumbnail-generator
===============================

PHP library to resize image to desired height and width or generate thumbnail

v1.5(8y ago)0178[1 issues](https://github.com/TBETool/img-thumbnail-generator/issues)PHPPHP &gt;=5.3.0

Since Oct 25Pushed 8y ago1 watchersCompare

[ Source](https://github.com/TBETool/img-thumbnail-generator)[ Packagist](https://packagist.org/packages/tbetool/img-thumbnail-generator)[ Docs](http://thebornengineer.com)[ RSS](/packages/tbetool-img-thumbnail-generator/feed)WikiDiscussions master Synced today

READMEChangelog (6)DependenciesVersions (7)Used By (0)

php-image-resize
================

[](#php-image-resize)

resize image to desired height/width or use it to generate thumbnail images

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

[](#installation)

```
composer require tbetool/img-thumbnail-generator

```

Usage
-----

[](#usage)

```
$thumb = new ImgThumbnailGenerator($source, $destination, $desired_width, $desired_height, $quality);

```

Parameters
----------

[](#parameters)

- **$source** =&gt; (required) path to source image to generate thumbnail
- **$destination** =&gt; (required) absolute destination path to save thumbnail to
- **$desired\_width** =&gt; (required) desired width of the image to resize to
- **$desired\_height** =&gt; desired height of the image to resize to, *If not provided, proportional height to widht ratio is used*
- **$quality** =&gt; quality of the thumbnail, *Default to 90*

Example
-------

[](#example)

```
$thumb = new ImgThumbnailGenerator('path_to/myImage.jpg', 'path_to/newThumb.jpp', 250, 250, 100);

```

Returns
-------

[](#returns)

**True:** when thumbnail is generated at destination **False:** if thumbnail generation is failed

Tips
----

[](#tips)

- To not provide `desired_height` parameter and set `quality` parameter, pass `NULL` in place of `$desired-height`
- To keep `$desired_height` and `$quality` to its default, call function like

```
$thumb = new ImgThumbnailGenerator($source, $destination, $desired_width);

```

Developer
---------

[](#developer)

Anuj Sharma ()

Repository
----------

[](#repository)

TBE ()

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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

Total

6

Last Release

3088d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

image resizerimage thumbnailphp image resizethumbnail generatejpeg resizepng resize

### Embed Badge

![Health badge](/badges/tbetool-img-thumbnail-generator/health.svg)

```
[![Health](https://phpackages.com/badges/tbetool-img-thumbnail-generator/health.svg)](https://phpackages.com/packages/tbetool-img-thumbnail-generator)
```

PHPackages © 2026

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