PHPackages                             huanguang/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. huanguang/image

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

huanguang/image
===============

多图上传插件

1.1.0(9y ago)013BSD-4-ClausePHP

Since Apr 7Pushed 9y agoCompare

[ Source](https://github.com/huanguang/image)[ Packagist](https://packagist.org/packages/huanguang/image)[ RSS](/packages/huanguang-image/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

多图上传带删除功能
=========

[](#多图上传带删除功能)

多图上传yii2组件,

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist huanguang/image "dev-master"

```

or add

```
"huanguang/image": "dev-master"

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
//在当前控制器的actions中添加如下配置
  public function actions()
        {
            return [
                'image-upload' => [
                        'class' => UploadsAction::className(),
                        //磁盘目录
                        'basePath' => '@webroot/upload',
                        //访问目录
                        'baseUrl' => '@web/upload',
                        //配置目录，注意前后加“/”
                        'CatalogFormat' => '/'.date('Y/m/d').'/',
                        //允许上传文件的格式
                        'allowtype' => ['gif', 'png', 'jpg','jpeg'],
                        //上传文件大小限制
                        'maxsize' =>2000000,
                        //保存后的图片名称是否随机true/false
                        'israndname' => true,
                ],
                //删除文件
                'image-del' => [
                        'class' => ImgdelAction::className(),
                        //磁盘目录
                        'basePath' => '@webroot/upload',
                        'baseUrl' => '@web/upload',
                ],
        ];
}

//调用方式,imageUrl为默认图地址

    //图片接收为img[]，数组形式
    //图片删除是没有数据库操作的，需另外增加
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

3

Last Release

3324d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08146283f4ff95b078cdf7bf50e619baebeb81de79750fe39b496d49d5e91ac5?d=identicon)[huanguang](/maintainers/huanguang)

---

Top Contributors

[![huanguang](https://avatars.githubusercontent.com/u/23442849?v=4)](https://github.com/huanguang "huanguang (12 commits)")

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/huanguang-image/health.svg)

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

###  Alternatives

[trntv/yii2-glide

Yii2 Glide Extension

41269.5k9](/packages/trntv-yii2-glide)[bilginnet/yii2-cropper

Yii2 Bootstrap Cropper Input Widget

2232.1k](/packages/bilginnet-yii2-cropper)[maxmirazh33/yii2-uploadable-cropable-image

Yii2 extension for upload and crop images

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

 yii2 image cropping extension

101.5k](/packages/developit-yii2-jcrop)

PHPackages © 2026

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