Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

resizing images within the template
 
bobbyl
Jr. Member
 
Total Posts:  13
Joined:  2009-01-19
 

I’m using the blank template as the basis of my site. I was just wondering if anyone could give me some advice as to how I change the image dimensions. The current dimensions do not work for my store, and therefore I would like to change them. For example, in the main product page, I’d ideally like the image to display around 490x270, and for the item in grid or list view to display around 200 x 110.

Thanks,

Bobby

 
Magento Community Magento Community
Magento Community
Magento Community
 
bobbyl
Jr. Member
 
Total Posts:  13
Joined:  2009-01-19
 

hate to bump this but really thought someone might have experienced it. I’ve looked through the template files and changed a few values I felt may have had an effect but unfortunately it doesn’t seem to have made too much difference upon viewing the site.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Damian Culotta
Enthusiast
 
Total Posts:  878
Joined:  2008-12-10
Argentina
 

Did you try using the method resize for product images?

$this->helper('catalog/image')->init($this->getProduct(), 'thumbnail'$_image->getFile())->resize(8080);
 
Magento Community Magento Community
Magento Community
Magento Community
 
bobbyl
Jr. Member
 
Total Posts:  13
Joined:  2009-01-19
 

I’ve been able to change the items in List and Grid View but unfortunately not within the main product page. My assumption is that it relates to this piece of code within media.phtml

<class="product-image">
    
<?php
        $_img 
'<img src="'.$this->helper('catalog/image')->init($_product'image')->resize(265).'" alt="'.$this->htmlEscape($_product->getImageLabel()).'" title="'.$this->htmlEscape($_product->getImageLabel()).'" />';
        echo 
$_helper->productAttribute($_product$_img'image');
    
?>
</p>

I change the resize to a different value, and include a height but I’m having no luck in actually changing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bobbyl
Jr. Member
 
Total Posts:  13
Joined:  2009-01-19
 

I seemed to fix this by simply changing the size of the CSS box and the value seems to relate specifically to this. What exactly does this mean the code above actually do then?

Thanks, Bobby.

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