Magento Forum

   
PLEASE Integrate this Smart Image Resizer…
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

http://shiftingpixel.com/2008/03/03/smart-image-resizer/

“A ridiculously easy-to-use PHP script for resizing images the smart way.”

Basically you upload one master image and then use code to resize it using this script.  Looks very similar to Scene7 (http://scene7.com)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

I think current Magento way is better for not requiring extra PHP processing during cached calls, and keeping image cache in same place.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

You still have to upload different sized images in the Admin, no?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Not really, look in app/design/frontend/default/default/template/catalog/product/list.phtml:

<img src="<?=$this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135);?>" width="135" height="135" alt="<?=$this->htmlEscape($_product->getName())?>"/>
Here it will get file name assigned in admin as “small_image” from the image gallery, and resize it automatically to 135x135

there are also methods for watermarking in ‘catalog/image’ helper (Mage_Catalog_Helper_Image)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

That’s great!  I’ll have to go check that out.  I haven’t played with the latest version much yet.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

Moshe!  This feature is AWESOME!  I just tried it with a new product and it worked great.  Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tweakmag
Guru
 
Avatar
Total Posts:  307
Joined:  2007-08-31
London, UK
 

Is it possible to just pass one parameter - ie. only width or only the height. If I upload a product image that is not square then it gets distorted. We had refactored the slider awhile ago to deal with this…

Another way would be to pass both attributes as you have it but rather than distorting the image so that it fits those dimensions exactly, could they not be used as maximum sizes, for example a 1000w x 500h image given the parameters width=’100’ height=’100’ would end up being 100w x 50h

what do you think?
Adam

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top