Drupal is a registered trademark of Dries Buytaert
Drupal 11.4.3 Update released for Drupal core (11.4.3)! Webform 6.2.11 Minor update available for module webform (6.2.11). Mailer Plus Log 1.2.6 Minor update available for module symfony_mailer_log (1.2.6). Burndown 1.0.66 Minor update available for module burndown (1.0.66). Icons 2.3.2 Minor update available for module icons (2.3.2). LocalGov News 2.5.3 Minor update available for module localgov_news (2.5.3). LocalGov Guides 2.2.4 Minor update available for module localgov_guides (2.2.4). LocalGov Services 2.2.6 Minor update available for module localgov_services (2.2.6). Menu Admin per Menu Module menu_admin_per_menu crossed 50,000 active installs. Visitors (Web Analytics) 8.x-2.33 Module visitors updated after 9 months of inactivity (8.x-2.33).

ShortPixel ImageAPI Optimize Processor is a custom Drupal module that integrates the ShortPixel POST-Reducer API as an optimization processor for the ImageAPI Optimize module.

The processor automatically optimizes images generated by Drupal Image Styles by uploading the generated file to ShortPixel and overwriting only the generated image style file, while keeping the original source image untouched.

The module fully respects Drupal’s image handling architecture and Drupal best practices.

Features

Supported Compression Modes

The processor supports all official ShortPixel compression strategies:

Lossy – Best balance between image quality and file size. Recommended for most websites.
Glossy – High-quality compression with minimal visual loss. Ideal for photography and premium visuals.
Lossless – Pixel-perfect optimization with no visual changes. Best for technical images and graphics.

The compression mode can be selected directly from the ImageAPI Optimize processor configuration.

CDN Delivery Mode

The processor can also rewrite public image URLs to the ShortPixel Adaptive Images CDN format.
Enable Rewrite public image URLs to ShortPixel CDN
Set the CDN base URL to https://cdn.shortpixel.ai, https://no-cdn.shortpixel.ai, or your own CDN host
The module rewrites public image URLs to the Adaptive Images API format and keeps the selected compression mode in sync
When CDN delivery is enabled, local Post-Reducer uploads are skipped and the CDN handles optimization and format negotiation

Post-Installation

Drupal generates an image using an Image Style
(the image is stored under the /styles directory)
ImageAPI Optimize invokes the ShortPixel processor
The generated image is uploaded to ShortPixel via the POST-Reducer API
The processor polls the API until optimization is complete
The optimized image replaces the generated Image Style file
The original image remains unchanged, as required by Drupal standards

For a deeper technical explanation, see the inline documentation in ShortPixel.php.

Additional Requirements

The module needs a ShortPixel API Key that you can get for free at shortpixel.com - the free account includes 100 image optimization per month.

Activity

Total releases
1
First release
Jul 2026
Latest release
2 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0 Stable Jul 14, 2026