PHPackages                             xtarantulz/yii2-input-img-preview - 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. xtarantulz/yii2-input-img-preview

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

xtarantulz/yii2-input-img-preview
=================================

Розширение для yii2-elfinder input, чтобы отображать превью выбраных файлов + fancybox

11.2k1[1 issues](https://github.com/xtarantulz/yii2-input-img-preview/issues)JavaScript

Since Mar 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/xtarantulz/yii2-input-img-preview)[ Packagist](https://packagist.org/packages/xtarantulz/yii2-input-img-preview)[ RSS](/packages/xtarantulz-yii2-input-img-preview/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-input-img-preview
======================

[](#yii2-input-img-preview)

The module is expansion ElFinder Input. If you use a text field to add pictures displayed thumbs.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist xtarantulz/yii2-input-img-preview "dev-master"

```

or add

```
"xtarantulz/yii2-input-img-preview": "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 :

```
use mihaildev\elfinder\InputFile;
use mihaildev\elfinder\ElFinder;
use xtarantulz\preview\PreviewAsset;
PreviewAsset::register($this);

echo $form->field($model, 'images')->widget(InputFile::className(), [
    'language'      => 'ru',
    'controller'    => 'elfinder', // вставляем название контроллера, по умолчанию равен elfinder
    'filter'        => 'image',    // фильтр файлов, можно задать массив фильтров https://github.com/Studio-42/elFinder/wiki/Client-configuration-options#wiki-onlyMimes
    'template'      => '{input}{button}',
    'options'       => ['class' => 'form-control img'],
    'buttonOptions' => ['class' => 'btn btn-success'],
    'multiple'      => true       // возможность выбора нескольких файлов
]);
```

Screenshot
----------

[](#screenshot)

[![screen-shot](https://github.com/xtarantulz/yii2-input-img-preview/raw/master/screen1.jpg)](https://github.com/xtarantulz/yii2-input-img-preview/blob/master/screen1.jpg)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

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/f77c5240f45a01b3d21a38455837e918966378c3932f1d5b61290dd0e62fa23c?d=identicon)[xtarantulz](/maintainers/xtarantulz)

---

Top Contributors

[![xtarantulz](https://avatars.githubusercontent.com/u/6269888?v=4)](https://github.com/xtarantulz "xtarantulz (78 commits)")

### Embed Badge

![Health badge](/badges/xtarantulz-yii2-input-img-preview/health.svg)

```
[![Health](https://phpackages.com/badges/xtarantulz-yii2-input-img-preview/health.svg)](https://phpackages.com/packages/xtarantulz-yii2-input-img-preview)
```

###  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)
