Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Combined image style

43 sites Security covered
View on drupal.org

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:

Activity

Total releases
5
First release
Mar 2025
Latest release
1 week ago
Releases (12 mo)
3 ▲ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.6 Stable Jul 7, 2026
1.0.5 Stable Nov 5, 2025
1.0.4 Stable Nov 4, 2025
1.0.3 Stable Apr 2, 2025
1.0.2 Stable Mar 19, 2025