Installation

This page is meant for those who have server access. If you don't have server access, just use the TinyPNG integration by entering an API key to the Image Optimizer settings page.


To run the optimizers locally, install at least one of the image optimizers on your server, see instructions below. I recommend installing all optimizers.

Also, make sure your PHP installation allows the functions 'proc_open' and 'proc_close'. You can ask your host, or check the php.ini file, or create a PHP file with '<?php phpinfo();'.

Optimizers on Ubuntu:

sudo apt-get install jpegoptim
sudo apt-get install optipng
sudo apt-get install pngquant
sudo apt-get install gifsicle
sudo npm install -g svgo

(in case npm is not installed, go to https://nodejs.org/en/download/package-manager/)

 

Optimizers on CentOS:

sudo yum install -y jpegoptim
sudo yum install -y optipng
sudo yum install -y pngquant
sudo yum install -y gifsicle
sudo npm install -g svgo

(in case npm is not installed, go to https://nodejs.org/en/download/package-manager/)

 

Optimizers on macOS (using Homebrew):

brew install jpegoptim
brew install optipng
brew install pngquant
brew install svgo
brew install gifsicle