Compress JPEG & PNG images
Make your store faster by compressing your JPEG and PNG images. This extension automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG.
Major new update 2.0 - July 2016
The extension now recognises duplicate images
in your Magento store. This will save even more bandwidth and reduces the number of compressions. The settings screen has been rewritten to show the latest compressions
. And all compressed images are now stored separately
so they don't get lost when you clear the cache. We are very happy with all these new improvements, hope you like them as much as we do!
How does it work?
When you view a product in your webshop Magento creates different image sizes in its cache folders. This extension will compress these images for you automatically.
In the background your product images are uploaded to the TinyJPG or TinyPNG service and analyzed to apply the best possible compression. Based on the content of the image an optimal strategy is chosen. The result is sent back to your Magento webshop and saved in your cache folder.
On average JPEG images are compressed by 40-60% and PNG images by 50-80% without visible loss in quality. Your webshop will load faster for your visitors, and you’ll save storage space and bandwidth!
Obtain your free API key from https://tinypng.com/developers
. The first 500 compressions per month are completely free, no strings attached! As each product will be shown in different sizes, roughly 100 products can be uploaded to your Magento webshop and compressed for free. You can also change which of the generated image sizes should be compressed, because each one of them counts as a compression. If you’re a heavy user, you can compress additional images for a small additional fee per image by upgrading your account. You will then be charged a small fee for each additional image compressed.
The extension can be installed on your system as follows:
- Use Magento Connect Manager and install the extension
- Log off first and then log in to your Magento Admin Panel
- Go to System > Configuration
- Click on "JPG & PNG compression"
- Enter your TinyPNG API key
- Select the image types to be compressed
- Upload a new image and view it in your catalog
You can clear the existing image cache in case you like to compress all existing product images:
- Go to System > Cache Management
- Click on "Flush Catalog Images Cache"
- Now view your catalog so the image cache is recreated
- The product images will be compressed automatically
You can inspect the number of compressions from the configuration page or by logging in to the TinyPNG developer section on https://tinypng.com/developers
Some Magento installations seem to generate duplicate product images
in the image cache. This leads to a much higher number of compressions than should be strictly necessary. We have solved this issue with version 2.0, if you still seem to run into similar issues with higher numbers of compressions please contact firstname.lastname@example.org so we can work together on a resolution.
This plugin is compatible with most Magento extensions, but not all of them. We have done a great deal of testing and discovered the following extensions which change the "Product Image" model to be incompatible: Change The Image Path by Lightyear, ImageCDN by Astound Commerce (One Pica) and Named Images by MageSpecialist.
Using a CDN
This extension improves the speed of your store. The speed can be further improved by installing a CDN. You will not need to install an extension to make use of a CDN because Magento has build-in native support for this. You can simply register with a CDN provider and configure the settings in the Magento admin.
Below are some links to popular CDN providers and instructions for setting it up with Magento:
- Amazon CloudFront
- Magento and Amazon’s CloudFront CDN – The Easy Way
- Using CloudFlare with Magento
- Magento CDN Integration
- Integrate CDN.net with Magento
- Setting up a CDN using Magento’s native support
- Integrate KeyCDN with Magento
SEO and pagespeed improvements
Using this extension to compress product images and installing a CDN are beneficial for your SEO. You may further improve the pagespeed score by installing Magento extensions like the following:
- Advanced SEO Suite by Mirasvit
- improves your performance in search engines
- Creare SEO
- provides extra features and settings to help enhance Magento's SEO performance
- SEO Suite Ultimate by MageWorx
- powers up you site ranking and cuts SEO workload
- Speedster by Fooman
For debugging purposes you can enable logging in the extension under the 'Advanced' tab. When this is enabled and the extension is installed correctly it will save its progress to the file /var/log/image-optimization.log.
You can also inspect your installation with the Modules Conflict Detector
by Alekseon. It will inspect your installation, look for extensions and also shows any extensions that may create problems.
Magento 1 Enterprise Edition
A separate version of this extension has been developed for the latest Magento Enterprise Editions
version 1.12, 1.13 and 1.14. If you are an enterprise user please visit the Enterprise edition download page
for more information. The enterprise edition is provided by our implementation partner TIG who also offer dedicated technical services and solutions for enterprise users.
Magento 2 Community Edition
A version of this extension has also been developed for Magento 2. If you are interested visit the Magento 2 extension download page
for more information.