PHPackages                             yiisoft/yii2-imagine - 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. [Framework](/categories/framework)
4. /
5. yiisoft/yii2-imagine

ActiveYii2-extension[Framework](/categories/framework)

yiisoft/yii2-imagine
====================

The Imagine integration for the Yii framework

2.3.1(3y ago)2865.4M—9.5%93[5 issues](https://github.com/yiisoft/yii2-imagine/issues)[1 PRs](https://github.com/yiisoft/yii2-imagine/pulls)20BSD-3-ClausePHPCI passing

Since Apr 13Pushed 3mo ago39 watchersCompare

[ Source](https://github.com/yiisoft/yii2-imagine)[ Packagist](https://packagist.org/packages/yiisoft/yii2-imagine)[ GitHub Sponsors](https://github.com/yiisoft)[ Fund](https://opencollective.com/yiisoft)[ RSS](/packages/yiisoft-yii2-imagine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (14)Used By (20)

 [ ![](https://camo.githubusercontent.com/17105745cc2de5e0c1005323ee9efd6fea5934f5bd72b6e05468fe042b9a7428/68747470733a2f2f696d6167696e652e72656164746865646f63732e696f2f656e2f6c61746573742f5f7374617469632f6c6f676f2e706e67) ](https://imagine.readthedocs.org/)

Imagine Extension for Yii 2
===========================

[](#imagine-extension-for-yii-2)

This extension adds most common image functions and also acts as a wrapper to [Imagine](https://imagine.readthedocs.org/)image manipulation library for [Yii framework 2.0](https://www.yiiframework.com).

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/03e64334e54011cceadc7cfbfb8ab3fb786862c22ba1e8c4b7e316b1b07a420e/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d696d6167696e652f762f737461626c652e706e67)](https://packagist.org/packages/yiisoft/yii2-imagine)[![Total Downloads](https://camo.githubusercontent.com/311817c66ab4ac5efb39d3f3348d26d2423759db9273b79452d040e96cd2bfb2/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d696d6167696e652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/yiisoft/yii2-imagine)[![Build Status](https://github.com/yiisoft/yii2-imagine/workflows/build/badge.svg)](https://github.com/yiisoft/yii2-imagine/actions)[![codecov](https://camo.githubusercontent.com/7d8b42e53458c9d9b24ebbd40c9b6d99086de02ad78a8b8ac83882b3ba0f2d78/68747470733a2f2f636f6465636f762e696f2f67682f796969736f66742f796969322d696d6167696e652f67726170682f62616467652e737667)](https://codecov.io/gh/yiisoft/yii2-imagine)

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

[](#installation)

Important

- The minimum required [PHP](https://www.php.net/) version is PHP `7.4`.
- It works best with PHP `8`.

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

Either run

```
composer require --prefer-dist yiisoft/yii2-imagine

```

or add

```
"yiisoft/yii2-imagine": "~2.2.0"
```

to the `require` section of your composer.json.

Basic Usage
-----------

[](#basic-usage)

This extension is a wrapper to the [Imagine](https://imagine.readthedocs.org/) and also adds the most commonly used image manipulation methods.

The following example shows how to use this extension:

```
use yii\imagine\Image;

// frame, rotate and save an image
Image::frame('path/to/image.jpg', 5, '666', 0)
    ->rotate(-8)
    ->save('path/to/destination/image.jpg', ['jpeg_quality' => 50]);
```

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance54

Moderate activity, may be stable

Popularity64

Solid adoption and visibility

Community53

Growing community involvement

Maturity70

Established project with proven stability

 Bus Factor3

3 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.

###  Release Activity

Cadence

Every ~255 days

Recently: every ~413 days

Total

13

Last Release

1353d ago

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/23416c58e0dce33a8369451a4ca0e28666373594027debc10184b37ade6a926b?d=identicon)[qiangxue](/maintainers/qiangxue)

---

Top Contributors

[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (40 commits)")[![qiangxue](https://avatars.githubusercontent.com/u/993322?v=4)](https://github.com/qiangxue "qiangxue (16 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (13 commits)")[![klimov-paul](https://avatars.githubusercontent.com/u/1482054?v=4)](https://github.com/klimov-paul "klimov-paul (12 commits)")[![Renkas](https://avatars.githubusercontent.com/u/5357180?v=4)](https://github.com/Renkas "Renkas (9 commits)")[![Arhell](https://avatars.githubusercontent.com/u/26163841?v=4)](https://github.com/Arhell "Arhell (6 commits)")[![pana1990](https://avatars.githubusercontent.com/u/6630197?v=4)](https://github.com/pana1990 "pana1990 (3 commits)")[![machour](https://avatars.githubusercontent.com/u/304450?v=4)](https://github.com/machour "machour (3 commits)")[![nadar](https://avatars.githubusercontent.com/u/3417221?v=4)](https://github.com/nadar "nadar (2 commits)")[![klevron](https://avatars.githubusercontent.com/u/4560725?v=4)](https://github.com/klevron "klevron (2 commits)")[![SDKiller](https://avatars.githubusercontent.com/u/2150916?v=4)](https://github.com/SDKiller "SDKiller (2 commits)")[![softark](https://avatars.githubusercontent.com/u/342857?v=4)](https://github.com/softark "softark (2 commits)")[![terabytesoftw](https://avatars.githubusercontent.com/u/42547589?v=4)](https://github.com/terabytesoftw "terabytesoftw (2 commits)")[![yuniorsk](https://avatars.githubusercontent.com/u/1545539?v=4)](https://github.com/yuniorsk "yuniorsk (1 commits)")[![bizley](https://avatars.githubusercontent.com/u/8577314?v=4)](https://github.com/bizley "bizley (1 commits)")[![creocoder](https://avatars.githubusercontent.com/u/896494?v=4)](https://github.com/creocoder "creocoder (1 commits)")[![gugoan](https://avatars.githubusercontent.com/u/1585443?v=4)](https://github.com/gugoan "gugoan (1 commits)")[![HaruAtari](https://avatars.githubusercontent.com/u/3523420?v=4)](https://github.com/HaruAtari "HaruAtari (1 commits)")[![Lesha701](https://avatars.githubusercontent.com/u/22198779?v=4)](https://github.com/Lesha701 "Lesha701 (1 commits)")[![mtangoo](https://avatars.githubusercontent.com/u/1502872?v=4)](https://github.com/mtangoo "mtangoo (1 commits)")

---

Tags

hacktoberfestimageimagesimaginethumbnailsyiiyii2helperimageimagineyii2

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yiisoft-yii2-imagine/health.svg)

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

###  Alternatives

[dragon-code/support

Support package is a collection of helpers and tools for any project.

238.7M101](/packages/dragon-code-support)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[iiifx-production/yii2-autocomplete-helper

Yii2 Autocomplete Helper

4226.9k2](/packages/iiifx-production-yii2-autocomplete-helper)[fancyecommerce/fec

fancy ecommerce

2212.0k2](/packages/fancyecommerce-fec)

PHPackages © 2026

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