Skip to content

agenceamiral/cakephp_thumbnail_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Thumbnail Helper for CakePHP 2.*

http://agenceamiral.com/labs/cakephp_thumbnail

ThumbnailHelper is a small CakePHP Helper library that allow the scaling, croping and framing of images files. Thumbnails are generated at the display and are cached for better performance.

Installation

Put the ThumbnailHelper.php file in the app/View/Helper directory

Usage

Thumbnail->get($original_image_path, array('size'=>'200', 'transform'=>'scale')); ?>

Options (general):

  • transform : 'crop', 'scale', 'frame'
  • cache : the path of the cache, defaults to ./thumbnails

Options (crop):

  • width : Width of the thumbnail
  • height : Height of the thumbnail
  • size : Alias of width and height for square thumbnails

Options (scale):

  • width : Width of the thumbnail
  • height : Height of the thumbnail
  • size : Alias of width and height for square thumbnails
  • maxWidth : Maximum width (use with maxHeight)
  • maxHeight : Maximum height (use with maxWidth)

Options (frame):

  • width : Width of the frame
  • height : Height of the frame
  • bgcolor : Color of the background

About

ThumbnailHelper is a small CakePHP Helper library that allow the scaling, croping and framing of images files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages