implement transformDimensions

Created on 15 November 2023, about 1 year ago
Updated 20 January 2024, 11 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.71.5 2024