Changing the size of product pictures in Magento

Standard the size of Magento product icon pictures are 135 x 135 pixels. For most purposes that size is a bit to small. How to change the size of these picture?

Changing the size of product images on category list

To change the size of  the image open your website directory and navigate to: app/design/frontend/default/default/template/catalog/product and open list.phtml. Around line 98 you see the following code:

<img src=”<?php echo $this->helper(‘catalog/image’)->init($_product, ‘small_image’)->resize(135); ?>” width=”135″ height=”135″ alt=”<?php echo $this->stripTags($this->getImageLabel($_product, ‘small_image’), null, true) ?>” />

Change it to by example 200 x 200:

<img src=”<?php echo $this->helper(‘catalog/image’)->init($_product, ‘small_image’)->resize(200); ?>” width=”200″ height=”200″ alt=”<?php echo $this->stripTags($this->getImageLabel($_product, ‘small_image’), null, true) ?>” />

Upload the file to your webdir and refresh the cache. Now you see the images in the greater format.

Changing the size of product images on the product page

You can do the same for the images on the product page. Just go to /app/design/frontend/default/default/template/catalog/product/view and open media.phtml. Here you see the same tag with resizing to 265. Change this to your desired format and refresh the cache.

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top