PHPackages                             haohetao/yii2-image-manager - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. haohetao/yii2-image-manager

ActiveYii2-extension[File &amp; Storage](/categories/file-storage)

haohetao/yii2-image-manager
===========================

A Yii2 module/widget for upload and cropping images

1.3.4(6y ago)0702↓100%BSD-3-ClausePHP

Since Sep 25Pushed 6y agoCompare

[ Source](https://github.com/haohetao/yii2-image-manager)[ Packagist](https://packagist.org/packages/haohetao/yii2-image-manager)[ Docs](https://github.com/haohetao/yii2-image-manager)[ RSS](/packages/haohetao-yii2-image-manager/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (3)Versions (30)Used By (0)

Image manager for Yii2(基于noam148/yii2-image-manager)
====================================================

[](#image-manager-for-yii2基于noam148yii2-image-manager)

A Yii2 module/widget for upload, manage and cropping images 数据库支持mysql和postgresql

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

[](#installation)

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

- Either run

```
php composer.phar require "haohetao/yii2-image-manager" "*"

```

or add

```
"haohetao/yii2-image-manager" : "*"
```

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

- Run the migrate to create the ImageManager table

```
yii migrate --migrationPath=@haohetao/imagemanager/migrations

```

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

```
'components' => [
    'imagemanager' => [
		'class' => 'haohetao\imagemanager\components\ImageManagerGetPath',
		//set media path (outside the web folder is possible),可以使用别名
		'mediaPath' => '@imageCommonPath/image-manager',
        'urlPath' => '/image-manager',
		//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,
		'databaseComponent' => 'db' // The used database component by the image manager, this defaults to the Yii::$app->db component
	],
],
```

params-local.php

```
