Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

One simple image extension for Yii framework

branch: master
README.md

yii-image-extension

One simple image extension for Yii framework

It uses WideImage (not bundled) and for now only includes Thumbnailer component that allows to generate thumbnails.

Installation

  • Download WideImage.

  • Unpack image extension under your extensions directory.

  • Configure Thumbnailer component:

    'thumbnailer'=>array(
        'class'=>'ext.image.Thumbnailer',
        'wideImagePath'=>'../../wideimage', // WideImage relative path from application base path
        'width'=>256,
        'height'=>256,
    ),

Usage

  • Generate a thumbnail:
Yii::app()->thumbnailer->generate('path-to/image.jpg', 'path-to/thumbnail.jpg');
Something went wrong with that request. Please try again.