Order image mappings by breakpoint ID and numeric multiplier

Created on 4 March 2022, almost 3 years ago
Updated 20 June 2023, over 1 year ago

Problem/Motivation

There are numerous assumptions in the responsive image code of sort ordering of image multipliers. Including the following code comment:

  // Retrieve all breakpoints and multipliers and reverse order of breakpoints.
  // By default, breakpoints are ordered from smallest weight to largest:
  // the smallest weight is expected to have the smallest breakpoint width,
  // while the largest weight is expected to have the largest breakpoint
  // width. For responsive images, we need largest breakpoint widths first, so
  // we need to reverse the order of these breakpoints.

Steps to reproduce

Found this while working on πŸ“Œ Apply width and height attributes to allow responsive image tag use loading="lazy" Fixed .

Proposed resolution

Force the order of all responsive image mappings to a known (proper) order.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
Responsive image  β†’

Last updated 3 days ago

Created by

heddn Nicaragua

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