PHPackages                             himiklab/yii2-easy-thumbnail-image-helper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. himiklab/yii2-easy-thumbnail-image-helper

AbandonedArchivedYii2-extension[Utility &amp; Helpers](/categories/utility)

himiklab/yii2-easy-thumbnail-image-helper
=========================================

Yii2 helper for creating and caching thumbnails on real time

1.1.5(7y ago)46120.0k↓20.2%164MITPHP

Since Nov 12Pushed 7y ago5 watchersCompare

[ Source](https://github.com/himiklab/yii2-easy-thumbnail-image-helper)[ Packagist](https://packagist.org/packages/himiklab/yii2-easy-thumbnail-image-helper)[ RSS](/packages/himiklab-yii2-easy-thumbnail-image-helper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (9)Used By (4)

Easy Thumbnail Image Helper for Yii2
====================================

[](#easy-thumbnail-image-helper-for-yii2)

![Packagist](https://camo.githubusercontent.com/fafd0f9d548eb8832f5e912c101a4345d4a5418470e9fcdea0462ff2558c74c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68696d696b6c61622f796969322d656173792d7468756d626e61696c2d696d6167652d68656c7065722e737667) ![Packagist](https://camo.githubusercontent.com/df06e27ec1ea51383fa03dbb1eda3d61a92ea9b650184041db15f20603f46532/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68696d696b6c61622f796969322d656173792d7468756d626e61696c2d696d6167652d68656c7065722e737667) ![license](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)

Yii2 helper for creating and caching thumbnails on real time.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

- Either run

```
php composer.phar require "himiklab/yii2-easy-thumbnail-image-helper" "*"

```

or add

```
"himiklab/yii2-easy-thumbnail-image-helper" : "*"
```

to the require section of your application's `composer.json` file.

- Add a new component in `components` section of your application's configuration file, for example:

```
'components' => [
    'thumbnail' => [
        'class' => 'himiklab\thumbnail\EasyThumbnail',
        'cacheAlias' => 'assets/gallery_thumbnails',
    ],
],
```

and in `bootstrap` section, for example:

```
'bootstrap' => ['log', 'thumbnail'],
```

It is necessary if you want to set global helper's settings for the application.

Usage
-----

[](#usage)

For example:

```
use himiklab\thumbnail\EasyThumbnailImage;

echo EasyThumbnailImage::thumbnailImg(
    $model->pictureFile,
    50,
    50,
    EasyThumbnailImage::THUMBNAIL_OUTBOUND,
    ['alt' => $model->pictureName]
);
```

or

```
use himiklab\thumbnail\EasyThumbnailImage;

echo EasyThumbnailImage::thumbnailImg(
    'http://...',
    50,
    50,
    EasyThumbnailImage::THUMBNAIL_OUTBOUND,
);
```

For other functions please see the source code.

If you want to handle errors that appear while converting to thumbnail by yourself, please make your own class and inherit it from EasyThumbnailImage. In your class replace only protected method errorHandler. For example

```
class ThumbHelper extends \himiklab\thumbnail\EasyThumbnailImage
{

    protected static function errorHandler($error, $filename)
    {
        if ($error instanceof \himiklab\thumbnail\FileNotFoundException) {
            return \yii\helpers\Html::img('@web/images/notfound.png');
        } else {
            $filename = basename($filename);
            return \yii\helpers\Html::a($filename,"@web/files/$filename");
        }
    }
}
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 86.2% 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 ~156 days

Recently: every ~93 days

Total

8

Last Release

2744d ago

### Community

Maintainers

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

---

Top Contributors

[![himiklab](https://avatars.githubusercontent.com/u/6266409?v=4)](https://github.com/himiklab "himiklab (25 commits)")[![worstinme](https://avatars.githubusercontent.com/u/2964518?v=4)](https://github.com/worstinme "worstinme (3 commits)")[![vkabachenko](https://avatars.githubusercontent.com/u/9642019?v=4)](https://github.com/vkabachenko "vkabachenko (1 commits)")

---

Tags

thumbnailhelperimageyii2

### Embed Badge

![Health badge](/badges/himiklab-yii2-easy-thumbnail-image-helper/health.svg)

```
[![Health](https://phpackages.com/badges/himiklab-yii2-easy-thumbnail-image-helper/health.svg)](https://phpackages.com/packages/himiklab-yii2-easy-thumbnail-image-helper)
```

PHPackages © 2026

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