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). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). 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.

Square Pixels Scale

6 sites Security covered
View on drupal.org

This module provides an image effect that scales images based on their total pixel count while maintaining the original aspect ratio. It's useful for displaying images of different aspect ratios at a similar apparent size.

Introduction

Square Pixels Scale adds an image effect (for use in image styles) that allows scaling based on the total number of pixels in an image (as calculated by multiplying the width by the height). The original aspect ratio of the image is maintained.

This module is useful in cases where images of varying aspect ratios (such as logos) will be displayed together and should have apparent sizes more similar than the basic scale effect can provide.

Requirements

This module has no special requirements.

Installation

Install as you would normally install a contributed Drupal module.
See: https://www.drupal.org/node/895232 for further information.

Configuration

The following configuration options are available once a square pixels scale
image effect has been added to an image style:

  • Total square pixels: This target number will be approximated by multiplying
    the width and height of the scaled image. The actual result will most likely
    not be the exact number, but slightly below or above.
  • Maximum width: A maximum width to which the image should be scaled
    (optional).
  • Maximum height: A maximum height to which the image should be scaled
    (optional).
  • Allow upscaling: Let square pixels scale make an image larger than its
    original size.

Activity

Total releases
1
First release
Jan 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
8.x-1.3 Stable Jan 30, 2025