PHPackages                             wardany/uploader - 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. wardany/uploader

ActiveYii2-extension

wardany/uploader
================

uploader behavior based on mohorev/yii2-upload-behavior

048PHP

Since Oct 17Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

uploader behavior
=================

[](#uploader-behavior)

uploader behavior based on mohorev/yii2-upload-behavior

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist wardany/uploader "*"

```

or add

```
"wardany/uploader": "*"

```

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

Usage
-----

[](#usage)

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

```
function behaviors()
    {
        $baseurl = isset(Yii::$app->components['frontend']) ? Yii::$app->urlManagerFrontEnd->baseUrl : Yii::$app->urlManager->baseUrl ;
        return [
            [
                'class' => UploadImageBehavior::className(),
                'attribute' => 'image',
                'scenarios' => ['insert', 'update'],
                'path' => '@frontend/web/media/images/{id}',
                'url' => "$baseurl/media/images/{id}",
                'unlinkOnDelete'=>true,
                'thumbPath' => '@frontend/web/media/images/{id}/thumbnail',
                'thumbUrl' => "$baseurl/media/images/{id}/thumbnail",
                'thumbs' => [
                    'header' => ['width' => 1536, 'height' => 600, 'mode'=>ImageInterface::THUMBNAIL_OUTBOUND],
                    'thumb' => ['width' => 300, 'height' => 300, 'mode'=>ImageInterface::THUMBNAIL_OUTBOUND],
                    'preview' => ['width' => 100, 'height' => 100, 'mode'=>ImageInterface::THUMBNAIL_OUTBOUND],
               ],
            ],
        ];
    }```
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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://www.gravatar.com/avatar/62061cc94e4ea6fcf80a6bf56a7835adcd1ec7cc8fd7bb949481764af63f6438?d=identicon)[muhammad wardany](/maintainers/muhammad%20wardany)

---

Top Contributors

[![m-wardany](https://avatars.githubusercontent.com/u/13200083?v=4)](https://github.com/m-wardany "m-wardany (2 commits)")

### Embed Badge

![Health badge](/badges/wardany-uploader/health.svg)

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

PHPackages © 2026

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