Kraken is a robust, ultra-fast image optimizer.

This module allows image files to be optimised using the Kraken.io webservice. After the initial configuration of a Kraken.io account, an administrator of your site can then configure image styles with the Kraken optimize effect.

Requirements

Installation

  • Install as you would normally install a contributed drupal module. See Installing modules (Drupal 7) for further information.
  • Install the kraken-php library. The easiest method is to use the Drush command provided with this module (drush kraken). If you don't have access to Drush then you need to get the kraken-php library from Github. Copying the whole of the kraken-php library into /sites/all/libraries is sufficient. The absolute requirement is that the file called 'Kraken.php' is available at /sites/all/libraries/kraken-php/lib/.

Configuration

  1. Go to /admin/config/media/image-toolkit to enter your Kraken.io api key and secret.
  2. Create a new style at /admin/config/media/image-styles/add.
  3. Choose 'Kraken optimize' in the 'Select new effect' list and add it as an effect.
  4. Set up an image field via a content type or use an existing image field which is intended to be used for krak'd images. Preview images may/may not be set to the image style you configured in step 3, above.
  5. Choose 'manage display' tab in from the content type's configuration pages and select and the image style as mentioned in step 3 above.

Steps 4 and 5 are merely guidelines. Themers may choose to do their own thing using 'theme_image_style', for example. See function theme_image_style.

Read more about Working with images in Drupal 7 and 8.

Upgrading

If you are upgrading from 7.x-1.x-alpha1, please run update.php to create the logging table.

TODO

  1. Set up tests.
  2. Display brief instructions on /admin/config/media/image-toolkit to explain where/how to set up an account on kraken.io
  3. Provide checkboxes for collecting kraken data in watchdog and the kraken table.
  4. Log kraken operations against the managed files
  5. Provide info on the status and version of the kraken-php library on the status page.

Project information

Releases