Magento Image Optimization

When you are working with images in Magento you have to keep in mind that images take up space and can potentially slow down your website a lot due to their size. There are certain tools to make sure your images look good and are web ready. I will discuss a few here in this post.

Magento Image Optimization

There are many tools for Magento Image Optimization. Some tools are specifically made for Magento and are mostly Extensions running inside Magento. Others are just regular image compressions slash optimization tools. Let’s get started.

Image Optimization Command line tools

There are several command line tools for Magento Image Optimization in bulk they can be installed on your Mac, PC or Linux box with relative ease. These tools can be used for any CMS so will work for Magento, WordPress and so on. There is a Stack Exchange Magento thread on it here . I will cite some commands I have used and that are mentioned there:

 

  • PNG Images: Using OptiPNG: optipng -o7 -strip all media/catalog/product/*.png
  • JPEG Images: Using JPEGTran: find media/catalog/product/ -name "*.jpg" -type f -exec jpegtran -copy none -optimize -outfile {} {} \;
  • GIF Images: Using GIFSicle: gifsicle --batch --optimize=3 media/catalog/product/*.gif

As you can see OptiPNG, JPEGTran and GIFSicle are used. These can be installed on any operating system. There is also PNGCrush as an alternative for OPtiPNG. Have not used the one for gifs myself as most images I upload are either pngs or jpegs.

OSX & Windows Image Optimization

There are programs for your Mac to optimize images before you upload them to your Magento installation. ImageOptim is one of them. I could mention others, but this is a great free tool that deals with most common image types. Great option if you don’t want to deal with online tools, command lines tools or do not want to pay for a good extension.

As for Windows, RIOT pops up in my mind. Been an OSX user for a while but this tools is for free and runs on Windows. Should do the job well too.

Magento Free Extension Compress JPEG and PNG Images

This is a free extension and is fairly popular at Magento Commerce. More so then the commercial extension I will discuss hereafter. But also of course because it is a free extension. It uses the TinyPNG and TinyJPEG services in the background to compres the images for which you need an API key. Free usage is limited to roughly 100 products / product images. After that you will be needing to pay to keep on using the API.

Magento Commercial Extension Image Optimization

There is also a commercially available extension to compress images in Magento. It is called Image Optimization and can be bought for $79. This tool reduces the size of your image the way the command line tools does, but without the need for them or the knowledge to take care of it from the command line.or use a free extension like this one or $79 with this extension

Further Reading

Mashable has a decent list of online and offline tools to compress images which should help you with Magento Image Optimization. It mentions programs for Windows and Mac like JPEGmini as well as online tools like Smush.it (imageoptim). As for me I would go for the free program I mentioned or the command line tools.

NB If you want to change the dimensions of images I would use Photoshop, Affinity Photo (Mac only) or Gimp. The latter being a free Open Source tool, the first two commercial ones. And to be fair these tools do have options to save for the web as well. Though I personally think the open source command line tools do a better job and give more control.

Tagged in : Tagged in : , , , ,
Jasper Frumau

Jasper has been working with web frameworks and applications such as Laravel, Magento and his favorite CMS WordPress including Roots Trellis and Sage for more than a decade. He helps customers with web design and online marketing. Services provided are web design, ecommerce, SEO, content marketing. When Jasper is not coding, marketing a website, reading about the web or dreaming the internet of things he plays with his son, travels or run a few blocks.