PHPackages                             scanerrr/yii2-local-image - 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. scanerrr/yii2-local-image

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

scanerrr/yii2-local-image
=========================

Resize images and save to cache.

029PHP

Since Dec 23Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-local-image
================

[](#yii2-local-image)

Simple Yii2 extension for resizing images and saving them to cache

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

[](#installation)

Add yii2-local-image to the require section of your composer.json file:

```
{
    "require": {
        "scanerrr/yii2-local-image": "dev-master"
    }
}
```

Or simply run

```
php composer.phar require "scanerrr/yii2-local-image @dev"
```

Usage
-----

[](#usage)

```
Html::img(Image::resize($pathToImage, $width, $height = null));
```

Resize image with saving aspect ratio, simply miss "height"

```
Html::img(Image::resize($pathToImage, 120))

/*
* Original image with resolution 1920x1080
* Result image gonna be 120x67
*/
```

TODO
----

[](#todo)

- Add CHANGELOG.md \[ \]
- Implement crop function \[ \]
- Allow to disable caching \[ \]
- Add tests \[ \]
- Add comments \[ x \]
- Add more extensions \[ \]
- Try to rewrite with Imagick \[ \]

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![Scanerrr](https://avatars.githubusercontent.com/u/11576877?v=4)](https://github.com/Scanerrr "Scanerrr (24 commits)")

### Embed Badge

![Health badge](/badges/scanerrr-yii2-local-image/health.svg)

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

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

133890.0k3](/packages/goat1000-svggraph)[imagekit/imagekit

PHP library for Imagekit

46877.3k10](/packages/imagekit-imagekit)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

12644.1k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

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