Shopping Cart

You have no items in your shopping cart.

30 days money back

We will refund to you if you want to return a product for any reason during 30 days after purchasing it. Read More...

6-month free support included

We guarantee free and fast support during the 6-month term after purchasing a product. Read More...

BUG FREE

If you find any bugs in our product during the support term, we will fix them for free. Read More...

Swipe to the right

How to Increase Image Quality on Magento Store?

By Igor Goltsov May 23, 2012 9795 Views 5 comments

Today I want to show you a fairly simple solution to increase the quality of images on your Magento store and make them a lot more attractive.

If one day you noticed that the images on your store are not as sharp as the images on your competitors site then you are probably losing potential customers. You must do something about it…

One of the major differences of e-commerce from traditional way of shopping is that buyers can't physically touch and feel products. That is why images play a major role for the buyer to understand the products.

Can you see the difference?

Before images are shown to the customers in your store, Magento handles them in this place:

Lib/Varien/Image/Adapter/Gd2.php 

If image quality is not strictly defined for certain types of images, Magento system takes the original value, and for some it calculates its own. All we need to do is to set the image quality to the highest value. This can be done if you open a file:

app/code/core/Mage/Catalog/Helper/Image.php

Find a method __toString() and just before try clause in the beginning of the method, insert the following snippet of code:

$this->_getModel()->setQuality(99);

The last step you need to do is go to Cache Management section and click "Flush Image Cache" button.

Voilà! If you visit your store catalog, you will be pleasantly surprised how much better the images look now. This solution takes a minimum amount of time but produces impressive results.

You can also take advantage of free Magpleasure File System extension to easily make code modifications.Moreover it's free.

In order for these modifications to remain after future Magento upgrade, we suggest first to copy the file:

app/code/core/Mage/Catalog/Helper/Image.php into app/code/local/Mage/Catalog/Helper/Image.php

and then modify this newly created file.

By following the above simple steps you can easily increase the quality of images in your Magento store.

Remember, a picture is worth a thousand words.

Enjoy!

James Daniel May 23, 2012 at 4:35 PM
I would not recommend doing this. The image comparison is misleading, as I can guarantee it won't make THAT big of a difference. The downside of it is that it will greatly increase the file size of all of your product images. Not only will that increase your bandwidth usage, but will also make your pages load slower.

If you have a really art driven site (like an e-commerce site that sells stock photography or something), then it may be worth trying, but I would really watch your page load.
Igor Goltsov May 24, 2012 at 4:28 AM
So, you absolutely right.
But sometimes, in some cases this trick can help to make a store much prettier.
This isn't recommended, but it works. Good example is http://www.iphonexcases.com. This one has big images for catalog and product pages. For these images it's necessary to be prettier.

But this is my personal opinion )
Julia August 15, 2012 at 5:50 AM
Learned a lot from this article. I will try my customer site. Thank you.
Ken Bakhtin November 16, 2012 at 9:56 AM
So it should look like this?


/**
* Set image quality, values in percentage from 0 to 100
*
* @param int $quality
* @return Mage_Catalog_Helper_Image
*/
public function setQuality($quality)
{
$this->_getModel()->setQuality(99);
return $this;
}
Igor Goltsov November 20, 2012 at 5:27 PM
Absolutely right =)
We use this code for some projects