Welcome to PotatoCommerce - Top Quality Magento Extensions Store

Home > Blog > Image optimization applications

Image optimization tools used by the Compressor extension for Magento

Posted on 13 October 2016


Hi. Our JS/CSS Compressor + Image Optimization extension for Magento comes with the following pre-compiled applications which are used by the exension to optimize images:

64-bit OS:

  • gifsicle v1.60 (used to optimize gif images)
  • optipng v 0.6.4 (used to optimize png images)
  • jpegoptim 1.2 (used to optimize jp(e)g images)

32-bit OS:

  • gifsicle v1.84 (used to optimize gif images)
  • optipng v 0.7.5 (used to optimize png images)
  • jpegoptim 1.4.1 (used to optimize jp(e)g images)

 

These applications are compiled for OS Ubuntu which is used on most servers where Magento is hosted. However, there are a lot of other OS like CentOS 6.7 where the applications could not work properly.

 

Image optimization diagnostics

If image optimization does not work on your website, then we recommend you to check:

  1. Make sure that all files in folder lib/PotatoCommerce/ImageOptimization/tools have 755 permissions. If it’s not, then set 755 permissions and try to start image optimization again. If it will not help, then go to the next step.
  2. If your server is on Ubuntu OS, then please contact us so that we can investigate the issue on the ground. 
    If your server is not on Ubuntu OS, then you should check if the applications work. To make this please do the following:
    • Go to folder lib/PotatoCommerce/ImageOptimization/tools/unix (go to ‘64’ subfolder as well if you have 64-bit OS)
    • Run the following commands:
        ./optipng -v
        ./jpegoptim --version
        ./gifsicle --version
    • If you receive an error (for example, “segmentation fault (core dumped)”), then this problem is present for your OS.

To fix this problem you need to perform the following commands to compile the applications right for your server. The same commands also need to be run if you want to update the applications.

 

Compiling the applications

gifsicle

wget https://www.lcdf.org/gifsicle/gifsicle-1.88.tar.gz
tar -xvzf gifsicle-1.88.tar.gz
cd gifsicle-1.88
./configure && make && make install
Installation/update of additional libraries may be needed


optipng

wget http://prdownloads.sourceforge.net/optipng/optipng-0.7.6.tar.gz
tar -xvzf optipng-0.7.6.tar.gz
cd optipng-0.7.6
./configure && make && make install
Installation/update of additional libraries may be needed



jpegoptim

wget http://www.kokkonen.net/tjko/src/jpegoptim-1.4.4.tar.gz
tar -xvzf jpegoptim-1.4.4
cd jpegoptim-1.4.4
./configure && make && make install

Installation/update of additional libraries may be needed

 

Then, if your version of Compressor is less than 1.5, then you need to update Compressor extension and set new paths to the applications and the recommended options:

Path to gifsicle: gifsicle
Recommended options: -b -O3

Path to optipng: optipng
Recommended options: -o7 -strip all

Path to optipng: jpegoptim
Recommended options: -f -o --strip-all --strip-icc --strip-iptc -m100

Then save and don't forget to refresh your cache.

You don't need to set these custom paths and options if you uses out-of-the-box pre-compiled applications.


Don’t hesitate to contact us if you need our assistance.