Set image height

Created on 2 November 2022, about 2 years ago
Updated 16 March 2023, over 1 year ago

Problem/Motivation

When resizer.js updates the width innitially, it does not set a height. As a result, the aspect ratio is temporarily incorrect until loading is complete. This causes a brief layout shift.

Proposed resolution

Calculate and set the height attribute based on the original width/height attributes and the new responsive width.

I've added a patch that addresses this.

🐛 Bug report
Status

Fixed

Version

1.3

Component

Code

Created by

🇧🇪Belgium kubrick

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024