implement transformDimensions

Created on 15 November 2023, 8 months ago
Updated 20 January 2024, 5 months ago

Problem/Motivation

In Drupal 10, responsive images have height and width attribute.
πŸ“Œ Apply width and height attributes to allow responsive image tag use loading="lazy" Fixed

In order to do that, every image effect that changes the dimensions of an image needs to communicate that change to effects that come after it.

Steps to reproduce

1. create an image style with absurd proportions, like 1:999
2. render the image in drupal 10

The image will look distorted because drupal will add height and width attribute that do not reflect the proportions of your image.

Proposed resolution

The code that calculates the new dimensions needs to be seperated from applyEffect. transformDimensions has to be implemented.

πŸ› Bug report
Status

Fixed

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany loominade

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024