image-helper Image helper for thumbnails

  1. Documentation
  2. Change Log

This is a helper for creating and caching thumbnails. Based on PHPThumb, The benefit over the image component ported from kohana is that it allows more resizing methods (like adaptive resize.

Resources

Documentation

Requirements
  • Yii 1.0 or above
  • The directory of the image needs to be writable... it will create a .tbm directory with all thumbnails for caching.
Installation
  • Extract the release file under protected/
Usage

See the following code example, it defaults to adaptive resize:

<?php echo Yii::app()->request->baseUrl.ImageHelper::thumb(600,800,$img, array('method' => 'resize'));?>

Default is:

<?php echo Yii::app()->request->baseUrl.ImageHelper::thumb(600,800,$img, array('method' => 'adaptiveResize'));?>

You can use the 3rd parameter for all options of PHP Thumb look on github for the documentation.

github.com/masterexploder/PHPThumb/

Change Log

August 15, 2010
  • Initial release.
7 2
6 followers
2 520 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Tags:
Developed by: mech7
Created on: Aug 15, 2010
Last updated: 14 years ago

Downloads

show all