Magento Forum

   
Images behaving differently at product level and getting expanded and distorted
 
Mark.Stocker
Jr. Member
 
Total Posts:  18
Joined:  2009-07-20
 

When I add an image to a product and I then view it on the web site the main image is expanded and slightly out of focus and if you double click it expands and is really blurred.

However, if you just click on the image below which says “more images” it exactly the same image but this time it gets displayed at it’s original size so it looks much better.

An example can be seen - http://www.moseyonline.please-make.me/portofino-french-wardrobe.html

Any idea how or why it’s behaving like this? I just want the original image size I uploaded displayed and not blown up and out of focus.

Cheers!

 
Magento Community Magento Community
Magento Community
Magento Community
 
tomchod
Jr. Member
 
Total Posts:  1
Joined:  2009-06-01
 

Hi There

Has anyone found a solution to this?

I am also getting this problem as well!!

It is doing it on every image displayed through the site which is a little bit weird!

 
Magento Community Magento Community
Magento Community
Magento Community
 
sneako
Member
 
Total Posts:  48
Joined:  2009-12-05
 

I am having the same issue.  I thought it might be the height of the original image so I shrunk it down to near nothing and Magento just blows it up to the large size and way out of focus. 

Anyone have the fix yet?

 
Magento Community Magento Community
Magento Community
Magento Community
 
sneako
Member
 
Total Posts:  48
Joined:  2009-12-05
 

Well, sorta found the reason here: http://www.magentocommerce.com/boards/viewthread/38126/

Unfortunately Magento Base Images don’t get automatically re-sized like the Thumbnails do.  Does anybody know a way around the lack of automatic resizing?  I’d hate to have to edit a thousand images to make them square

 
Magento Community Magento Community
Magento Community
Magento Community
 
sneako
Member
 
Total Posts:  48
Joined:  2009-12-05
 

oooo I figured it out.

within this file:  app/design/frontend/***your_theme_here***/template/catalog/product/view/media.phtml

Change:

$_img '<img id="image" src="'.$this->helper('catalog/image')->init($_product'image')->.'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';

To:

$_img '<img id="image" src="'.$this->helper('catalog/image')->init($_product'image')->resize(795).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';

Depending on the zoom depth (via the - & +) you wish to have you can edit the “795” to be higher or lower (I did multiples of 265 cause it messed up on other multiples for some odd reason).  Raise the number (ie: 1325) to make the zoom ability much greater or lower it (ie: 265) to make the zoom ability barely anything.

I’m not sure how “resize” knows what size to make the image, I assume it’s a clause somewhere in the code but all I know is that it worked for me :D

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