Drupal is a registered trademark of Dries Buytaert
drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! linkit 7.0.14 Minor update available for module linkit (7.0.14). masquerade 8.x-2.2 Minor update available for module masquerade (8.x-2.2). video_embed_field 3.1.0 Minor update available for module video_embed_field (3.1.0). bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). editoria11y 3.0.0 Major update available for module editoria11y (3.0.0). trash 3.0.27 Minor update available for module trash (3.0.27). twig_tweak 4.0.0-alpha2 New alpha version released for module twig_tweak (4.0.0-alpha2). twig_tweak 4.0.0-alpha1 First alpha version released for module twig_tweak (4.0.0-alpha1). node_revision_delete 2.1.1 Minor update available for module node_revision_delete (2.1.1). commerce_paypal 2.1.2 Minor update available for module commerce_paypal (2.1.2).

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)

Activity

Total releases
2
First release
Mar 2026
Latest release
1 month ago
Release cadence
18 days
Stability
50% stable

Releases

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