Last updated 5 December 2014. Created on 16 April 2010.
Edited by brunodbo, jcisio, samspinoy, pfrenssen. Log in to edit this page.

This article helps site administrators configure ImageAPI Optimize to have optimized image output size.

The module supports several tools to do this, for different image formats. ImageAPI Optimize can manipulate newly created images only, so it cannot optimize existed images. For such usage, you can use a bash script written by Joel Hardi.

Image optimization requires external tools written mainly in C/C++. You can download and compile them yourself. Some are available as binary. Some are already present on most systems.

  • (PNG) advpng is a part of advancecomp. It is available in most distros (Debian). If you don't have root access to the server you will need to compile it.
  • (PNG) OptiPNG is a tool to optimize PNG images. This module uses the default option for a size/execution time trade-off. OptiPNG can be built by ./configure;make
  • (PNG) PNGCRUSH predecessor where optipng was forked.
  • (JPEG) jpegtran is a part of jpeglib and is available in most systems, if not please install the package libjpeg-progs. This tool can remove extra markers from source file.
  • (JPEG) jfifremove strip JFIF headers. You need to compile it: gcc -o jfifremove jfifremove.c

The module is open for more tools. But the size/time trade-off must be considered. You can also use 3rd party service like smush.it.

Drupal 7 install note

Since this module is no longer dependent on the ImageAPI module, the settings are not situated under admin/settings/imageapi any more, but under admin/config/media/image-toolkit

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.