3
votes

I've noticed that images being served to the front end are bigger than the image is on the server. From what I can tell, Magento runs the images through some filter that does things like adds watermarks, adjusts colors, etc. Is there a way to disable this feature?

edit: Sorry, I should have been more specific. I'm referring to product images, and actual file sizes, not height/width. The file size of the product images being served are bigger than their original files.

1
I've also noticed this behavior which strikes me as rather odd. The images have the exact same dimensions but the file size of the one on the front end is about a third larger. Have you found out anything about it?Louis B.
Same here. It increases some file sizes by almost 500%. Its really disturbing. I am yet to look into their code though. But its strange.burntblark

1 Answers

1
votes

The catalog/product image tags are defined in Magento's template files. The image sizes defined will vary, depending on what images you are referring to.

These templates call the images like this:

In app/design/frontend/base/default/catalog/product/list.phtml

<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>

If notice on the end, there is a resize function that has a set number in there. This number will tell Magento to automatically resize the image it retrieves to that dimension. You can pass a height and width to the resize function, like so:

..->resize(height, width);

As far as I know, there is no configuration setting that will globally disable this resize function. You would have to override and void the function using a overwritten file or extension. I would recommend just uploading the correct sized images (larger than the minimum sizes seen on the site). Magento will then properly scale them down without loss of quality.