Image Optimizer for Magento

Rating:
90% of 100
$0.00
In stock
SKU
PMEIO

Optimize your images, reduce their file size without losing image quality and speed up your site.
Magento 1 Current Extension Version: 2.2.0
Compatible with: 1.5, 1.6, 1.6.1, 1.6.2.0, 1.7, 1.8, 1.8.1, 1.9, 1.9.1, 1.9.2, 1.9.3
Magento 2 Current Extension Version: 2.2.1
Compatible with: 2.0, 2.1, 2.2

Links

Maximum number of characters: 255

$0.00

Speed Up Your Magento Site For Free!

Works great with Minify HTML CSS JS (also FREE)!

Compatible with both Magento v1 and Magento v2 !

(Two separate versions of the extension. One for Magento v1 and one for Magento v2.)

Apptrian Image Optimizer will optimize your images (GIF, JPG, PNG) reduce their file size without losing image quality and speed up your site. Extension is very easy to install and use. You can optimize images by clicking a button in Magento Admin or automatically by a configurable cron job. If you are an advanced user you will be pleased to know that extension is fully configurable. You can change optimization options even swap utilities used for optimization with the ones you like. (By default our extension is using optimization utilities recommended by Google PageSpeed Insights and GTmetrix.)

Image Optimizer is fully compatible with Google Perceptual JPEG encoder "guetzli"

However you need to:

1. Install guetzli on your server.
This is not covered by our Installation and Support services. More info on how to install guetzli can be found here.

2. Configure our extension to use guetzli.
In our extension config in "Utility" section
For "JPG Utility" type guetzli
For "JPG Utility Exact Path" type full path where you installed guetzli or if you added it to the system path then type only name of the binary it should be guetzli
For "JPG Utility Options" type:
--quality 90 %filepath% %filepath%
you can adjust quality option to your liking.

3. Test optimization by using test images we provided and manually compare file size before and after optimization. (Configuring and testing guetzli is covered by our Installation and Support services.)

Warning! Before using our extension on real images you must test optimization utilities. (Please follow configuration and testing instructions.)

Warning! Extension relays on third party utilities (gifsicle, jpegoptim (32-bit only), jpegtran and optipng). It is also highly dependent on a server type and configuration. There is a possibility it will not work for you. Please understand that there is no PHP code we can write that will make previously mentioned utilities work if they are not compatible with your server nor circumvent your server configuration.

Our extension will NOT change visual quality of the images.

Our extension will NOT change resolution of the images.

Our extension is only the last step in the image optimization that will help you to pass Google PageSpeed Insights and GTmetrix test, it is not the substitution for best practices regarding preparation of images for the web.
Before uploading images to the web (in this case Magento) you need to prepare them. This is wide subject but the most important things are:
- Choose the right format for the image (gif, jpg, png) (Read the FAQs for more information)
- Choose the right resolution for the image (Read the FAQs for more information)

IMPORTANT NOTICE

Google PageSpeed Insights test has changed the rules regarding image optimization.

Use GTmetrix to check your image optimization status.

You can see the change in the example of our site.

In Google PageSpeed Insights type https://www.apptrian.com and click "Analyze" button. You will see that for several .jpg images our site home page does not pass the "Optimize images" test. (It was passing few months ago for the same images.)

Now go to GTmetrix test type https://www.apptrian.com and click "Analyze" button. You will see that our site passes the "Optimize images" test.

Our educated guess is that Google PageSpeed Insights test now requires lowering the .jpg image quality in order to pass the test. As we already pointed out our extension is set so it does not change image quality. If anyone knows the new rules for Google PageSpeed Insights test please contact us and provide the link. Thank you for your understanding.

Features

General

- Easy way to enable or disable extension.
- Batch Size is the number of images to be optimized per click or cron execution.
- Paths option is a text area field where you can type paths you want to be scanned for images.
- Convenient "Start Scan and Reindex Process" button for scanning and reindexing images.
- Convenient "Start Optimization Process" button for optimizing images.
- Convenient Progress Bar will give you info about percentage and number of optimized images.
- Convenient "Clear Index" button for resetting progress bar and ability to start index and optimization processes again.

Cron

- Easy way to enable or disable Scan and Reindex Process Cron Job.
- Option to type Cron Expression for Scan and Reindex Process.
- Easy way to enable or disable Optimization Process Cron Job.
- Option to type Cron Expression for Optimization Process.

Utility

- Use 64-bit Utilities option will allow you to run 64-bit version of utilities.
- Log Utility Output option allows you to log information about optimization process.
- Force file permissions after optimization.
- Utilities Path option allows you to swap optimization utilities.
- GIF Utility allows you to set GIF optimization utility.
- GIF Utility Exact Path allows you to specify path to your GIF utility if it is already installed on your system.
- GIF Utility Options allows you to set GIF utility options.
- JPG Utility allows you to set JPG optimization utility.
- JPG Utility Exact Path allows you to specify path to your JPG utility if it is already installed on your system.
- JPG Utility Options allows you to set JPG utility options.
- PNG Utility allows you to set PNG optimization utility.
- PNG Utility Exact Path allows you to specify path to your PNG utility if it is already installed on your system.
- PNG Utility Options allows you to set PNG utility options.

Installation Instructions (For Magento v1)

- Log in to Magento Admin
- (Optional) Disable Magento Compiler if you are using it (System > Tools > Compilation)
- Go to (System > Magento Connect > Magento Connect Manager) and install extension
- Go back to Magento Admin
- Flush Magento Cache (System > Cache Management), then log out from Magento Admin and log back in
- (Optional) Enable Magento Compiler by clicking "Run Compilation Process" button (System > Tools > Compilation)
- Set execute permissions on files inside lib/Apptrian/ImageOptimizer
- If you already have gifsicle, jpegtran, and optipng installed on your server use "Utility Exact Path" fields to point extension to your installed versions of these utilities.

If you do not know how to install extension or you wish a professional to do it for you, we offer additional Installation service for a small fee.

Please test extension before you use it!
Download testimages.zip file (inside are test images that are not optimized). Unpack testimages.zip file into your Magento root. Then in our extension configuration for the option "Paths" remove everything and type "testimages". Click "Start Scan and Reindex Process" and after it is finished click "Start Optimization Process". After it is finished download files from "testimages" directory and compare with the ones in testimages.zip file. Downloaded files should be smaller in size. If it is working delete "testimages" directory from your Magetno root and in extension configuration for the option "Paths" type "media;skin/frontend". Now you can use extension.

For sites with many images please be aware of memory_limit requirement. Our extension is tested with 1000000+ images in the index. To operate index with 1000000+ images you need to set PHP value memory_limit to 1024M or more.
For sites with up to 500000 images minimal required memory_limit value is: 512M
For sites with up to 250000 images minimal required memory_limit value is: 256M
Above values are minimal required ones, if you can set them to higher value then set them higher.

Installation Instructions (For Magento v2)

Unpack .zip file inside your Magento root.

Run following commands on Magento root directory:

php bin/magento module:enable --clear-static-content Apptrian_ImageOptimizer

php bin/magento setup:upgrade

php bin/magento cache:flush

php bin/magento setup:static-content:deploy

If you do not know how to install extension or you wish a professional to do it for you, we offer additional Installation service for a small fee.

Configuration

Find Image Optimizer "bin" directory. (Can be "app/code/Apptrian/ImageOptimizer/bin" or "vendor/apptrian/image-optimizer/bin".) Set execute permissions on files inside this directory. These permissions are usually 755. (If you already have gifsicle, jpegtran, and optipng installed on your server use "Utility Exact Path" fields to point extension to your installed versions of these utilities. If utilities are added to the system path then in "Utility Exact Path" fields type only the name of the utility.)

For sites with many images please be aware of memory_limit requirement. Our extension is tested with 1000000+ images in the index. To operate index with 1000000+ images you need to set PHP value memory_limit to 1024M or more. You should not worry about this for sites with up to 500000 images because Magento 2 default value for memory_limit is 768M (you can see this in .htaccess file in your Magento root and this is also where you change memory_limit if needed).

Testing

Please test extension before you use it!
Download testimages.zip file (inside are test images that are not optimized). Unpack testimages.zip file into your Magento "pub" directory. Then in our extension configuration for the option "Paths" remove everything and type "pub/testimages". Click "Start Scan and Reindex Process" button and after it is finished click "Start Optimization Process" button. After it is finished download files from "pub/testimages" directory and compare with the ones in testimages.zip file. Downloaded files should be smaller in size. (It does not matter how much smaller just need to be different file size. These are just test images.) If it is working delete "testimages" directory from your Magetno "pub" directory and in extension configuration for the option "Paths" type "pub". Now you can use extension.

Be aware that some third party optimization utilities like optipng might change image file permissions to 664 or 666 after optimization. This is not always desirable so to make sure all optimized images have right permissions after optimization use "Force File Permissions" option in our extension config and type permissions you want. Example: 0644 (These permissions might not be good for your server so best way to know is to look what are your images permissions before you start optimization.)

Be aware that included versions of binary utilities gifsicle, jpegtran, and optipng might not work on every server. If the file size of test images (in bytes) does not change after optimization this means that particular utility is not compatible with your server. In that case you need to install version of the utility specifically created for your server OS.

gifsicle
If you are on Debian/Ubuntu:
sudo apt-get install gifsicle
If you are on Fedora/Centos/RedHat:
sudo yum -y install gifsicle

jpegtran
If you are on Debian/Ubuntu:
sudo apt-get install libjpeg-progs
If you are on Fedora/Centos/RedHat:
sudo yum install libjpeg-turbo-utils

optipng
If you are on Debian/Ubuntu:
sudo apt-get update
sudo apt-get install optipng
If you are on Fedora/Centos/RedHat:
sudo yum install optipng

After utility or utilities are installed use "GIF Utility Exact Path", "JPG Utility Exact Path", and "PNG Utility Exact Path" and type full path where these are installed on your server or just binary utility name "gifsicle", "jpegtran", "optipng" (without quotes). (Properly installed binary utilities are usually added to system path so you do not need to type full path for these options.)

Installing above mentioned utilities would probably require root access. Because of this you will probably need to contact your server support. Some shared hosting services do not allow installation of any binary utility. In that case you will not be able to use our extension.

Installation of binary utilities on your server is not covered by our installation service nor support service.

If you do not know how to install and/or test extension or you wish a professional to do it for you, we offer additional Installation service (that includes testing) for a small fee.

If you want to configure it differently log to your Magento Admin and go to

Stores > Configuration > Apptrian Extensions > Image Optimizer

All options are self explanatory and have tooltips for additional information.

After changing options make sure you refresh your Magento cache.

This extension is FREE however support is NOT

Please understand that we get more than a few emails almost every day asking for support. In most cases problems are lack of basic Magento knowledge and not reading Installation Instructions. Due to our other projects we do not have time to answer all of them. Because of this we cannot provide free support for our free extensions. However we offer very affordable support options for this extension on our site.

For Advanced Users and Web Developers

Image Optimizer extension is using following utilities for image optimization:
gifsicle
jpegoptim (32-bit only)
jpegtran
optipng
As you probably know these need to be installed so extension is using self-contained alternatives:
gifsicle-bin
jpegoptim-bin (32-bit only)
jpegtran-bin
optipng-bin
You can find all of these on GitHub.

Using these third party binaries presents a problem because on some servers some of them might not work. So we would like to ask you to help us improve this extension. If extension is not working for you contact us maybe we can help. If you find a bug report it. If you find a solution to some problem let us know. All of the useful information will be posted in FAQ section so other people can save time searching for solutions.

FAQ (For Magento v1)

Q: After upgrading from older version of Image Optimizer to v2.1.0 (or newer) my old index data is gone and Progress Bar is reset?
A: Image Optimizer v2.1.0 and newer save index data to a file instead of database. If you are upgrading from any previous version of Image Optimizer prior to v2.1.0 you will loose old index data. Previously optimized images will still be optimized but you will need to re-index and re-optimize all images again. Optimizing images twice or multiple times will not change quality of images. Image optimization utilities sense if images are optimized and just re-save images without changing them.

Q: After upgrading from older version of Image Optimizer to 2.2.0 and newer, optimization does not work anymore.
A: If you are upgrading from any previous version of Image Optimizer prior to v2.2.0 after installation/upgrade you need to go to extension configuration and for option "Utilities Path" instead of "lib/apptrian/imageoptimizer" type "lib/Apptrian/ImageOptimizer" then save the changes and refresh your Magento cache. Also set execute permissions on files inside lib/Apptrian/ImageOptimizer directory.

Q: Image Optimizer does not work for me, is there anything I can do?
A: Maybe. First, follow Testing Instructions. Second step is to check permissions on files inside lib/Apptrian/ImageOptimizer. Third is to try 64-bit Utilities option. Forth use "Utility Exact Path" options but before you do gifsicle, jpegtran, and optipng must be installed on your server (Contact your server support and ask them to install these for you and to send you full path where these are installed. Some hosting companies will do this other will not). If gifsicle, jpegtran, and optipng are added to system path you can just type name of the binary not a full path. (Some servers usually have jpegtran installed. Minimal version required for Image Optimizer to work is v8d but the latest version is preferable.)

Q: Why after clicking "Start Optimization Process" button, none of the images are optimized?
A: Utility binaries located in lib/Apptrian/ImageOptimizer must be executable which means you have to set right permissions on files inside this directory.

Q: After clicking "Start Optimization Process" button, error message appears "Optimization failed because PHP exec() function is disabled."?
A: This means your server PHP is configured in such a way that PHP exec() function is disabled. Contact your hosting company and ask them to allow exec() function. This usually happens on shared hosting accounts and hosting companies keep this function disabled until you ask them to enable it. This function is needed in order for image optimization utilities to be executed. If you cannot execute optimization utilities you cannot optimize images.

Q: Why Google PageSpeed Insights reports my images are not optimized despite I optimized them properly and can see difference in file size (in bytes)?
A: Our extension only optimizes images on your site, it will not change format nor resolution of your images. This brings us to the best practices regarding images and web. You must prepare your images from the start if you want to pass Google PageSpeed Insights test. This means choosing the right format and resolution for every image.
Image Formats:
GIF is used for images that have very few colors (small web design elements). It is also used for simple animations if it is animated GIF (banners).
JPG is used for images with many colors (photos, product images, and some other design elements).
PNG is used for images where accurate transparency is needed (usually used for design elements, small element backgrounds/css sprites).
Resolution is best explained via example. Lets say you have an image on your site that is 2000x2000px. However on your page it is resized via CSS to 1000x1000px. If you check your page containing this image via Google PageSpeed Insights it will tell you something like this:
Compressing and resizing http://www.example.com/media/wysiwyg/image.jpg could save 110.1KiB (79% reduction).
You need to download image.jpg then resize it to 1000x1000px with the image editing program of your choice and upload back to original location on the server. Then use our extension to optimize it. Only if you done everything correctly you will pass Google PageSpeed Insights test.

Q: Progress bar is stuck?
A: This happens when in one batch of images there are many very large ones and due to memory and time limits for script execution optimization is aborted. To overcome this, lower the "Batch Size" option to 10. In some cases of very large images and certain server configurations you will need to set "Batch Size" to 1. After you optimize these large images you can set "Batch Size" back to default value of 50.

Q: Why are not all images optimized?
A: Only images that are on your server can be optimized. Also sometimes Google PageSpeed Insights will report .gif images with transperancy not optimized despite the fact they are. For images that have transparency use .png files. There is also an edge case when you use one format while you would get much smaller file using another. (Read one of the above FAQ for more info on how to choose appropriate image format.)

FAQ (For Magento v2)

Q: After upgrading from older version of Image Optimizer to v2.1.0 (or newer) my old index data is gone and Progress Bar is reset?
A: Image Optimizer v2.1.0 and newer save index data to a file instead of database. If you are upgrading from any previous version of Image Optimizer prior to v2.1.0 you will loose old index data. Previously optimized images will still be optimized but you will need to re-index and re-optimize all images again. Optimizing images twice or multiple times will not change quality of images. Image optimization utilities sense if images are optimized and just re-save images without changing them.
To upgrade to new version delete all files from:
app/code/Apptrian/ImageOptimizer
then copy new extension files and issue following commands:
php bin/magento setup:upgrade
php bin/magento cache:flush
then delete all files from:
var/generation/Apptrian/ImageOptimizer
directory.

Q: Image Optimizer does not work for me, is there anything I can do?
A: Maybe. First, follow Testing Instructions. Second step is to check permissions on files inside Image Optimizer "bin" directory. (Can be "app/code/Apptrian/ImageOptimizer/bin" or "vendor/apptrian/image-optimizer/bin".) Third is to try 64-bit Utilities option. Forth use "Utility Exact Path" options but before you do gifsicle, jpegtran, and optipng must be installed on your server (Contact your server support and ask them to install these for you and to send you full path where these are installed. Some hosting companies will do this other will not). If gifsicle, jpegtran, and optipng are added to system path you can just type name of the binary not a full path. (Some servers usually have jpegtran installed. Minimal version required for Image Optimizer to work is v8d but the latest version is preferable.)

Q: Why after clicking "Start Optimization Process" button, none of the images are optimized?
A: Utility binaries located in "app/code/Apptrian/ImageOptimizer/bin" or "vendor/apptrian/image-optimizer/bin" must be executable which means you have to set right permissions on files inside this directory.

Q: After clicking "Start Optimization Process" button, error message appears "Optimization failed because PHP exec() function is disabled."?
A: This means your server PHP is configured in such a way that PHP exec() function is disabled. Contact your hosting company and ask them to allow exec() function. This usually happens on shared hosting accounts and hosting companies keep this function disabled until you ask them to enable it. This function is needed in order for image optimization utilities to be executed. If you cannot execute optimization utilities you cannot optimize images.

Q: Why Google PageSpeed Insights reports my images are not optimized despite I optimized them properly and can see difference in file size (in bytes)?
A: Our extension only optimizes images on your site, it will not change format nor resolution of your images. This brings us to the best practices regarding images and web. You must prepare your images from the start if you want to pass Google PageSpeed Insights test. This means choosing the right format and resolution for every image.
Image Formats:
GIF is used for images that have very few colors (small web design elements). It is also used for simple animations if it is animated GIF (banners).
JPG is used for images with many colors (photos, product images, and some other design elements).
PNG is used for images where accurate transparency is needed (usually used for design elements, small element backgrounds/css sprites).
Resolution is best explained via example. Lets say you have an image on your site that is 2000x2000px. However on your page it is resized via CSS to 1000x1000px. This means your image is much bigger than it needs to be. If you check your page containing this image via Google PageSpeed Insights it will tell you something like this:
Compressing and resizing http://www.example.com/pub/media/wysiwyg/image.jpg could save 110.1KiB (79% reduction).
You need to download image.jpg then resize it to 1000x1000px with the image editing program of your choice and upload back to original location on the server. Then use our extension to optimize it. Only if you done everything correctly you will pass Google PageSpeed Insights test.

Q: Progress bar is stuck?
A: This happens when in one batch of images there are many very large ones and due to memory and time limits for script execution optimization is aborted. To overcome this, lower the "Batch Size" option to 10. In some cases of very large images and certain server configurations you will need to set "Batch Size" to 1. After you optimize these large images you can set "Batch Size" back to default value of 50.

Q: Why are not all images optimized?
A: Only images that are on your server can be optimized. Also sometimes Google PageSpeed Insights will report .gif images with transparency not optimized despite the fact they are. For images that have transparency use .png files. There is also an edge case when you use one format while you would get much smaller file using another. (Read one of the above FAQ for more information on how to choose appropriate image format.)

A Word From the Author

Thank you very much for your interest in Image Optimizer extension. You can rest assured that by choosing this extension you are getting high quality product despite the fact it is free. Same professional approach, dedication and care are invested in this product as if it is paid one. If you find this product useful and want to say "thanks" you can do that by rating it and writing short review about it on Magento Connect or Magento Marketplace. Also you can like, share and follow us on Facebook, Google+, Pinterest, and Twitter.

If you have any questions about extension or Magento in general feel free to contact us.

Write Your Own Review
Only registered users can write reviews. Please Sign in or create an account
Copyright © 2014-2017 Apptrian.com. All rights reserved.