If you want to change size of image on category page navigate to app/design/frontend/[your_package]/[your_theme]/catalog/product/list.phtml
and search for the line:
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($productgridimagewidth,$productgridimageheight); ?>" width="<?php echo $productgridimagewidth; ?>" height="<?php echo $productgridimageheight; ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
and change it to:
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(170, 170)->setQuality(100) ?>" width="170" height="170" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
you can use any size in resize(width, height) function
and if you want to change the image of product page then head to app/design/frontend/[your_package]/[your_theme]/catalog/product/view.phtml
and search for the same:
By default the re-size of the product images working in the following way:
<?php echo $this->helper('catalog/image')
->init($_product, 'small_image')->resize(135); ?>
The code generate the 135х135px image. There are a number of additional parameters that control the image output, here is a list of these parameters with default values:
<?php
echo $this->helper('catalog/image')->init($_product, 'small_image')
->constrainOnly(false)
->keepAspectRatio(true)
->keepFrame(true)
->keepTransparency(true)
->backgroundColor(array(255,255,255))
->resize(135, 135);
?>
If you want to get images on actual width or height use the following:
<?php
echo $this->helper('catalog/image')
->init($_product, 'small_image')->getOriginalWidth();
echo $this->helper('catalog/image')
->init($_product, 'small_image')->getOriginalHeight();
?>
Either set keepFrame to true, so it's always exact size, or set keepAspectRatio to false.
Best Answer
It looks like an issue related to Magento, you have to modify the code or upload the images directly to the server without WYSIWYG editor.
Someone say it can be disabled with the new SUPEE-9767 patch.
"The image processing that was added in SUPEE-9767 patch is now optional. You may disable it by setting the config general/reprocess_images/active to 0 programmatically, but not via the Admin panel. Although, once you change it the image exploit will appear again."