Using EWWW Image Optimizer with WordPress

This is a useful image optimiser tool that allows you to compress existing images on your website and will manage any images added in the future. This can reduce site load times significantly and is one of the top suggested features by sites such as Pingdom.

The plugin itself can be found in the plugin library for WordPress but to install the required components needs a bit more work. The plugin is installed on a site-by-site basis, so if you host several WP sites you will need to add it to each individually.

One the plugin has been added open it, it will give you a list of missing dependencies. Each of these is listed below and needs to be added to /bin.

Please make sure you run the following command to check you have the needed applications to get, make and install the needed programs.

yum install wget gcc libpng-devel autoconf automake

 

pngquant

wget pngquant.org/pngquant-2.12.2-src.tar.gz
tar xvzf pngquant-2.12.2-src.tar.gz
cd pngquant-2.12.2/
./configure
make
make install

 

optipng

wget https://sourceforge.net/projects/optipng/files/OptiPNG/optipng-0.7.7/optipng-0.7.7.tar.gz
tar xvzf optipng-0.7.7.tar.gz
cd optipng-0.7.7/
./configure
make
make install

 

webp

wget storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.1.tar.gz
tar xvzf libwebp-1.0.1.tar.gz
cd libwebp-1.0.1/
./configure
make
make install

 

jpegtran

wget jpegclub.org/reference/wp-content/uploads/2018/03/jpegsrc.v9c.tar.gz
tar xvzf jpegsrc.v9c.tar.gz
cd jpeg-9c/
./configure
make
make install

 

gifsicle

wget deb.debian.org/debian/pool/main/g/gifsicle/gifsicle_1.91.orig.tar.gz
tar xvzf gifsicle_1.91.orig.tar.gz
cd gifsicle-1.91/
./configure
make
make install

 

Each of these is required for EWWW to run correctly. Some may already be installed, just add the ones that are showing as missing by the EWWW plugin.

Once these have been added any new images you upload will be automatically compressed. You can see how much space your images are reduced by switch the Media Library view to list mode and this will give you the details of the size and how much it has been reduced by in %.

For the images that are already uploaded to the site, the Media Library will give you the option on individual images to optimse them. If you have a large number of images already uploaded you will find a ‘Bulk Optimiser’ tool in the Media menu.}

This will run a scan of the sites database for all the images currently in the library. It will then give you a text box showing how many images there are read to optimise. Once you click ‘start’ you need to leave the message window open until the compression is completed otherwise the process will stop and you will have to start it again to finish the task.