Magento Forum

Resized images not loading correctly
 
vinhle
Jr. Member
 
Total Posts:  2
Joined:  2012-09-24
 

Hi all,

Have a glitch that\’s driving me insane.

Basically, I want my images in the product grid view to not be square, but more wide than high. So i followed this thread http://www.magentocommerce.com/boards/viewthread/2888/P0/
and changed the resize function in list.phtml to resize(203,120) width=203 height=120 from the original resize(203).

Does it work? Weirdly yes and no.

When a category first loads by clicking a menu item, the images load as 203x203 (square).
- I check the code and the image source is also 203x203
<img class=\"pr-img\" src=\".../catalog/product/cache/1/small_image/203x/9df78..../product.jpg\" width=\"203\" height=\"203\".... />
- I check the image itself (right click view image) and it shows the same location as above

Then if i\’m in the same category and click page 2 (or change the sort by or number of products per page), the images are correct! They now show up as 203x120 as i intended. HOWEVER
- When I check the code, the image source is the same as before for 203x203
<img class=\"pr-img\" src=\".../catalog/product/cache/1/small_image/203x/9df78..../product.jpg\" width=\"203\" height=\"203\".... />
- But if i check the image itself (right click view image) it shows the newly resized image (203x120)
http://...../catalog/product/cache/1/small_image/203x120/9df78......./product.jpg
- What the hell? And i if i keep navigating through the same category, the images remain as i want them. But as soon as i click over to another category, it\’s back to the square image.

So basically, the source code does not match the actual image - is this even possible?

AND any way to make the correct image size to load up correctly?

Please help!

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