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.



Hello world! Welcome to Magento Problems.

Magento Problems is a new blog on which I share all kind of problems that I come across myself in developing Magento websites. For example I share tips about plugins, common problems and more.

Keep track of this blog, because I’ll try to post updates on regulary basis.