Skip to content

zeljkoprsa/magento-adaptive-resize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Magento Adaptive Resize

Implements an adaptive resize function just like the phpthumbs library implementation

What it does is resize the image to get as close as possible to the desired dimensions, then crops the image down to the proper size from the center. This is called adaptive resizing. phpThumb

How To Use

  • Simply download the source code here: magento-adaptive-resize.zip and extract into your Magento install directory.
  • Flush the Magento cache

Now where ever you can call the normal resize() method on an image you can call adaptiveResize() instead!

Example:

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->adaptiveResize(160, 213) ?>" width="160" height="213" alt="<?php echo $this->htmlEscape($_product->getName()); ?>" />

About

Adaptive resize image helper for Magento

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published