PHPackages                             alkurn/yii2-thumbnail - 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. alkurn/yii2-thumbnail

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

alkurn/yii2-thumbnail
=====================

Yii2 helper for creating and caching thumbnails on real time

0743PHP

Since May 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/alkurn/yii2-thumbnail)[ Packagist](https://packagist.org/packages/alkurn/yii2-thumbnail)[ RSS](/packages/alkurn-yii2-thumbnail/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

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

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 --prefer-dist "alkurn/yii2-thumbnail" "dev-master"

```

or add

```
"alkurn/yii2-thumbnail" : "*"
```

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

- Add a new lines in `bootstrap` file of your application, for example:

```
Yii::setAlias('@uploads', dirname(dirname(__DIR__)) . '/uploads');
Yii::setAlias('@cache', dirname(dirname(__DIR__)) . '/uploads/cache');
Yii::setAlias('@image',   '/uploads/cache');

```

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

```
'components' => [
    'thumbnail' => [
                'class' => 'alkurn\thumbnail\Thumbnail',
                'cacheAlias'    => Yii::getAlias('@cache/'),
                'uploadsAlias'  => Yii::getAlias('@uploads/'),
                'imageAlias'    => Yii::getAlias('@image/'),
                'defaultImage'  => 'default.png',
            ],
],
```

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 alkurn\thumbnail\ThumbnailImage;

echo ThumbnailImage::thumbnailImg(
    $model->image,
    50,
    50,
    ThumbnailImage::THUMBNAIL_OUTBOUND,
    ['alt' => $model->image]
);
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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/485ae3b1c7496e2d8d100c7c12274e3e7d490afc132ef1b3a2b2a30f10727e1e?d=identicon)[gmankar](/maintainers/gmankar)

---

Top Contributors

[![grmankar](https://avatars.githubusercontent.com/u/10545660?v=4)](https://github.com/grmankar "grmankar (9 commits)")[![TechAlkurn](https://avatars.githubusercontent.com/u/56467158?v=4)](https://github.com/TechAlkurn "TechAlkurn (9 commits)")[![mganeshalkurn](https://avatars.githubusercontent.com/u/68955804?v=4)](https://github.com/mganeshalkurn "mganeshalkurn (5 commits)")

### Embed Badge

![Health badge](/badges/alkurn-yii2-thumbnail/health.svg)

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

###  Alternatives

[cturbelin/rserve-php

Rserve client library for PHP

4435.0k](/packages/cturbelin-rserve-php)[eureka2/g6k

Generator of simulator of calculation (calculator)

235.5k](/packages/eureka2-g6k)

PHPackages © 2026

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