Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Combined image style

Security covered Under active development 50 sites

This module allows you to combine multiple image styles into a single derivative, reducing the number of image styles needed. It provides a drop-in replacement for core image style handling and offers basic field formatters for image and media entity reference fields.

Started off as a module for developers who need the combined output of multiple image styles. It serves as a drop-in replacement of the core image style handling and both systems just keep working. It combines the image style machine names for folder structure and itok tokens for security.

E.g. you have image styles "portrait", "square" and "landscape" which will crop an image into the desired shape. Now you want to generate, for each of the previously mentioned, images to "thumbnail", "medium" and "large" sizes. In this simple example you can reduce the amount of images styles from 9 to 6.

Return a render array:

(new CombinedImageStyle())
  ->setSourceUri($uri)
  ->setImageStyles(['square', 'thumbnail'])
  ->toImage();

return the image style URI.

(new CombinedImageStyle())
  ->setSourceUri($uri)
  ->setImageStyles(['square', 'medium'])
  ->buildCombinedUri();

Generate the derivative and return the image style URI.

(new CombinedImageStyle())
  ->setSourceUri($uri)
  ->setImageStyles(['square', 'large'])
  ->buildCombinedUri(TRUE);

The module now also has a submodule with a couple of really basic field formatters for image and media (entity reference) fields. Other modules that work with this module:

Drupal 10–11

Ask your assistant about Combined image style

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
8
Tracked since
Jan 2025
Latest release
3 weeks ago
Releases (12 mo)
4
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.7 Stable 10–11 Sep 23, 2026
1.0.6 Stable 10–11 Jul 7, 2026
1.0.5 Stable 10–11 Nov 5, 2025
1.0.4 Stable 10–11 Nov 4, 2025
1.0.3 Stable 10–11 Apr 2, 2025
1.0.2 Stable 10–11 Mar 19, 2025
1.0.1 Stable 8–11 Jan 14, 2025
1.0.0 Stable 8–11 Jan 2, 2025