Compress images using the ImageOptim API

ProcessWire ImageOptim

This ProcessWire module is a wrapper around ImageOptim, a service that compresses and optimizes images in the cloud. ImageOptim currently handles JPG, PNG and GIF files.

Please refer to their site for API details and pricing information.

Module configuration screen

Installation


Install the module like any other ProcessWire module, by either copying the folder into your /site/modules/ directory or installing it via the admin.

Register with ImageOptim


To compress images, you first need to sign up for an ImageOptim account. They offer a free trial.

If you already have an account, you can find your username in the ImageOptim dashboard.

Usage


See Usage for detailed instructions and all API parameters.

Images can be optimized by calling the optimize() method on any image. The module also has an automatic mode that optimizes all image variations after resizing. This is the recommended way to use this module since it leaves the original image uncompressed, but optimizes all derivative images.

Module options


The compression level can be set globally. Alternatively, compression settings can be set per filetype, e.g. medium quality for JPEGs and low quality for PNGs. For details, see the module configuration screen.

Optimized files are renamed: *.jpg becomes *-optim.jpg. This suffix can be configured in the module settings.

Note that in automatic mode, files are not renamed but swapped in place.

Additional resources


License


GPL

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #523
    In the 523rd issue of ProcessWire Weekly we'll check out what's new in the core this week, share some new module related news, and more. Read on!
    Weekly.pw / 18 May 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH