A Yii2 Media management extension
This package is auto-updated.
Last update: 2021-12-21 15:29:07 UTC
Yii2 extension to provide media file management with model fileupload Uploaded files managed all in a database table.
The preferred way to install this extension is through composer.
composer require "kmergen/yii2-media: "*"
require section of your
$ yii migrate --migrationPath=@vendor/kmergen/yii2-media/migrations
In your configuration file set the following:
'bootstrap' => [ 'kmergen\media\Bootstrap', ... ], 'modules' => [ 'media' => [ 'class' => 'kmergen\media\Module' ], ... ]
'components' => [ 'image' => [ 'class' => 'kmergen\media\components\Image' ], ... ]
Now you can everywhere in your application e.g. get a thumb with "Yii::$app->image->thumb('path/to/original/image', '$thumbStyle')".
Note: This extension is under development. Use it not in production.