It’s been a long time since my last post.  In fact, I haven’t updated this site in a year or so.  I had planned on adding many more pages and updating the blog regularly, but soon after I made this site I decided to pursue two new pretty big projects.  One of them is an e-commerce site that I’m just finishing up.  As these two projects get rolling, I’ll have more time for this site, and I’d like to keep it current and add more pages and posts regularly.  For now though, a relatively short post on a fix, which I’ve recently implemented in my new e-commerce project.

First, Magento is an awesome shopping cart.  I’ve used several, and Magento just blows them all out of the water.  And, the community edition is free.  It took me a while to give it a go, because I read and heard so many people talk about how difficult it was to wrap your head around, how it was a beast, how the learning curve was steep, etc.  Having used it now for several months, I disagree.  I’ve found Magento to be fairly intuitive, and very easy/quick to learn.  There are some issues, as with everything, but a quick search almost always turns up a quick and relatively easy fix.  However…

Magento Product Images Suck!

For some strange reason, Magento has decided to compress uploaded product images in a way that results in very poor quality images.  Even if you upload an image that is the appropriate size, Magento will compress it.  Product image quality is one of the most important components of an e-commerce site, for obvious reasons, and this is a serious flaw.

goes on for 11 pages (so far), from 2008 to 2013, with numerous possible ways to fix the product image quality problem.  I believe I tried all of the solutions in that thread, but none of them resulted in perfect quality images.  In addition, many of the listed fixes would break when a new update would be released.  So I came up with my own method, which allows you to use any image you create with no compression at all.

How to Get Uncompressed, Perfect Product Images

When you upload a product image, Magento creates a compressed copy.  When you load a page on your site in your browser (front end) with a different size of that image, Magento then creates a compressed version of that sized image too.  It may end up creating as many as 4 different variations: the full sized image, a thumbnail for the “cart”, a medium sized image for the product listing/category page, and a larger version for the product page itself.

The solution is simple.  You simply replace the compressed images with perfect images, via FTP.  It’s not ideal.  And it would be a serious pain if you’ve already got hundreds or thousands of products on your site.  (Although, any solution will require you to upload all new images, anyway.)  But it does work, and it will stick even when Magneto is updated.

  1. First, upload your image(s).
  2. Second, go to your front end and load each page that is going to display a variation of the uploaded image(s).  If your products are already live, you can skip those two steps.
  3. Right click on your product image on the front end of your site, and view the file info to find the location of the image in your file system.
  4. FTP into your file system and replace the Magento generated images with your own perfect images.

You’ll see that Magneto places different sized variations in parent folders that are named based on the pixel size, and uses standard naming conventions.  So an image named “image-name_1.jpg” might be located in a parent folder named “450″ for example.  That’s going to be the 450 pixel version of your image, compressed by Magento.  You can create your own 450px sized images, name them the way Magento names them, and simply drag them into the folder to replace the Magento generated/poorly compressed images.  Presto.  You’ve got perfect images now.

Again, it’s not an ideal solution, as it would be best if Magento would automatically create perfect images, or give you the option of using uncompressed images!  But I have yet to find a way to get it to do so.  At least this fix works, isn’t difficult, and won’t break with the next update.