PHPackages                             fgh151/yii2-image-resize - 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. [Caching](/categories/caching)
4. /
5. fgh151/yii2-image-resize

ActiveYii2-extension[Caching](/categories/caching)

fgh151/yii2-image-resize
========================

A Yii2 component for resizing images (and cache it)

v0.0.6(4y ago)01.1kMITPHPCI passing

Since Feb 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/fgh151/yii2-image-resize)[ Packagist](https://packagist.org/packages/fgh151/yii2-image-resize)[ Docs](https://github.com/fgh151/yii2-image-resize)[ RSS](/packages/fgh151-yii2-image-resize/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

Image resize for Yii2
=====================

[](#image-resize-for-yii2)

A Yii2 component for resizing images and store it in a cache folder

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

[](#installation)

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

- Either run

```
php composer require "fgh151/yii2-image-resize" "*"

```

or add

```
"fgh151/yii2-image-resize" : "*"
```

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' => [
    'imageresize' => [
		'class' => 'fgh151\imageresize\ImageResize',
		//path web root
        'cachePath' => '@frontend/web',
        //path where to store thumbs
        'cacheFolder' => 'upload/thumb',
		//use filename (seo friendly) for resized images else use a hash
		'useFilename' => true,
		//show full url (for example in case of a API)
		'absoluteUrl' => false,
	],
],
```

Usage
-----

[](#usage)

If you want to get a image url:

```
/*
 * $sImageFilePath_id: (required) path to file
 * $width/$height: (required) width height of the image
 * $mode: "outbound" or "inset"
 * $$quality: (1 - 100)
 * $chosenFileName: if config -> components -> imageresize -> useFilename is true? its an option to give a custom name else use original file name
 */
\Yii::$app->imageresize->getUrl($imageFile, $width, $height, $mode, $quality, $chosenFileName);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Recently: every ~192 days

Total

6

Last Release

1814d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/645524?v=4)[Fedor Gorsky](/maintainers/fgh151)[@fgh151](https://github.com/fgh151)

---

Top Contributors

[![fgh151](https://avatars.githubusercontent.com/u/645524?v=4)](https://github.com/fgh151 "fgh151 (7 commits)")

---

Tags

imageresizecacheyii2extensioncomponent

### Embed Badge

![Health badge](/badges/fgh151-yii2-image-resize/health.svg)

```
[![Health](https://phpackages.com/badges/fgh151-yii2-image-resize/health.svg)](https://phpackages.com/packages/fgh151-yii2-image-resize)
```

###  Alternatives

[noam148/yii2-image-resize

A Yii2 component for resizing images (on the fly)

1144.6k7](/packages/noam148-yii2-image-resize)[sadovojav/yii2-image-thumbnail

Yii2 image thumbnail component

2142.1k](/packages/sadovojav-yii2-image-thumbnail)[liyunfang/yii2-upload-behavior

Upload behavior for Yii 2

161.7k](/packages/liyunfang-yii2-upload-behavior)[undefinedor/yii2-cached-active-record

The cached activeRecord for the Yii2 framework

102.6k](/packages/undefinedor-yii2-cached-active-record)

PHPackages © 2026

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