PHPackages                             noam148/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. [Image &amp; Media](/categories/media)
4. /
5. noam148/yii2-image-resize

ActiveYii2-extension[Image &amp; Media](/categories/media)

noam148/yii2-image-resize
=========================

A Yii2 component for resizing images (on the fly)

1.1.0(8y ago)1144.6k↓25%8[1 PRs](https://github.com/noam148/yii2-image-resize/pulls)7BSD-3-ClausePHP

Since Nov 24Pushed 2y ago4 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (4)Used By (7)

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.phar require "noam148/yii2-image-resize" "*"

```

or add

```
"noam148/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' => 'noam148\imageresize\ImageResize',
		//path relative web folder. In case of multiple environments (frontend, backend) add more paths
		'cachePath' =>  ['assets/images', '../../frontend/web/assets/images'],
		//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", "inset" or "{horz}:{vert}" where {horz} is one from "left", "cetrer", "right" and {vert} is one from "top", "center", "bottom"
 * $$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($sImageFilePath, $width, $height, $mode, $quality, $chosenFileName);
```

**If you got questions, tips or feedback? Please, let me know!**

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~225 days

Total

3

Last Release

3005d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10885039?v=4)[noam148](/maintainers/noam148)[@noam148](https://github.com/noam148)

---

Top Contributors

[![noam148](https://avatars.githubusercontent.com/u/10885039?v=4)](https://github.com/noam148 "noam148 (12 commits)")[![isalcedo](https://avatars.githubusercontent.com/u/2588745?v=4)](https://github.com/isalcedo "isalcedo (2 commits)")[![rtf-const](https://avatars.githubusercontent.com/u/1955908?v=4)](https://github.com/rtf-const "rtf-const (1 commits)")

---

Tags

imageresizeyii2extensioncomponenton-the-fly

### Embed Badge

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

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

###  Alternatives

[sadovojav/yii2-image-thumbnail

Yii2 image thumbnail component

2142.1k](/packages/sadovojav-yii2-image-thumbnail)[yurkinx/yii2-image

Yii2 extension for image manipulating using Kohana Image Library.

66412.9k9](/packages/yurkinx-yii2-image)[raoul2000/yii2-jcrop-widget

This extension is a wrapper for the jQuery Image Cropping Plugin (jcrop)

10248.3k2](/packages/raoul2000-yii2-jcrop-widget)[maxmirazh33/yii2-uploadable-cropable-image

Yii2 extension for upload and crop images

1020.8k](/packages/maxmirazh33-yii2-uploadable-cropable-image)

PHPackages © 2026

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