Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Configuration Language Lock 1.0.2 Minor update available for module config_language_lock (1.0.2). Release: Canvas Override 1.0.1 Minor update available for module canvas_override (1.0.1). Release: Media Remote Image 8.x-1.2 Minor update available for module media_entity_remote_image (8.x-1.2). Release: IDNA Convert Service (punycode) 2.0.4 Minor update available for module idna (2.0.4). Release: Bootstrap Cloud 7.1.3 Minor update available for theme bootstrap_cloud (7.1.3). Release: Token Browser 1.0.2 Minor update available for module token_browser (1.0.2). Release: Varbase Project 11.0.8 Minor update available for module varbase_project (11.0.8). Release: Media Remote Image 2.0.0-beta1 First beta version released for module media_entity_remote_image (2.0.0-beta1). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Security Coverage: Module Scout Module module_scout now has official Drupal security advisory coverage.

Scale by orientation

1 sites Security covered Drupal 10–11
View on drupal.org

This module automatically scales images to a consistent size based on their orientation. It sets the longest side of an image to a specified pixel dimension, ensuring landscape, portrait, and square images have a uniform visual weight. This is particularly useful for image galleries and grids.

Scale by Orientation

Automatically scales images based on their orientation to create consistent sizes.

What it does

This image effect scales images to a target pixel size on their longest side:

  • Landscape images (wider than tall): Scales width to your target size
  • Portrait images (taller than wide): Scales height to your target size
  • Square images: Treated as landscape, scales width

Perfect for galleries and grids where you want images to have similar visual weight. It works well with "set canvas" from Image Effects module

How to use it

  1. Go to Configuration → Media → Image styles
  2. Edit an image style (or create new)
  3. Click Add effect
  4. Choose Scale by Orientation
  5. Set your options:
    • Target dimension: The pixel size (e.g., 200)
    • Upscale images: Check to enlarge small images, uncheck to leave them as-is

Examples

With a 200px target dimension:

Original Result 400×200 landscape 200×100 200×400 portrait 100×200 300×300 square 200×200

Without upscaling: A 50×25 image stays 50×25

With upscaling: A 50×25 image becomes 200×100

Requirements

  • Drupal 10 or 11
  • Image module (core)

Depends on

Dependencies of the latest stable release

  • image Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Mar 2026
Latest release
5 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0 Stable 10–11 Mar 27, 2026
1.0.x-dev Dev 10–11 Mar 9, 2026