2017 © Pedro Peláez
 

yii2-extension yii2-image-up

Image upload and preview for yii2 models using yii2-upload-behavior extension.

image

hector-del-rio/yii2-image-up

Image upload and preview for yii2 models using yii2-upload-behavior extension.

  • Wednesday, November 4, 2015
  • by hector-del-rio
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-image-up

Simple and responsive image upload and preview for yii2 models using yii2-upload-behavior extension., (*1)

When using this extension in your ActiveForm an image preview of the specified attribute will be shown along with a button to change it. When a new image is selected, the preview will show the new image., (*2)

screen shot 2015-08-13 at 14 43 36, (*3)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist hector-del-rio/yii2-image-up "^1.0.0"

or add, (*6)

"hector-del-rio/yii2-image-up": "^1.0.0"

to the require section of your composer.json file., (*7)

Requirements

This extension builds up on top of yii-dream-team/yii2-upload-behavior's class ImageUploadBehavior. You must follow the instructions on how to use this module, which can be found here., (*8)

Usage

In your view:, (*9)

<?= $form->field($model, 'photo')->widget(hectordelrio\imageUp\ImageUp::className()); ?>

Options

The following options are available to configure:, (*10)

  • thumbsEnabled: whether thumbs should be shown instead of original size images. The widget will enable thumbs only if they can be found.
  • thumbProfileName: the thumb profile name as specified in ImageUploadBehavior configuration. Defaults to "thumb".
  • options: the options to be passed to the Html::activeFileInput() function. More info can be found here
  • previewOptions: the options to be passed to the Html::img() function. More info can be found here

The Versions

04/11 2015

dev-master

9999999-dev

Image upload and preview for yii2 models using yii2-upload-behavior extension.

  Sources   Download

MIT

The Requires

 

by Hector del Rio

yii2 model upload behavior image photo thumb preview picture

13/08 2015

1.0.0

1.0.0.0

Image upload and preview for yii2 models using yii2-upload-behavior extension.

  Sources   Download

MIT

The Requires

 

by Hector del Rio

yii2 model upload behavior image photo thumb preview picture