Skip to content

Incubation: Responsive Image Fine-Tuning Knobs #736

Open

Description

@noamr

WebKittens

@annevk @smfr

Title of the proposal

Better Responsive Image Knobs

URL to the spec

whatwg/html#13053

URL to the spec's repository

https://github.com/whatwg/html

Issue Tracker URL

No response

Explainer URL

https://github.com/noamr/explainers/blob/main/responsive-images-explainer.md

TAG Design Review URL

No response

Mozilla standards-positions issue URL

mozilla/standards-positions#1477

WebKit Bugzilla URL

No response

Radar URL

No response

Description

A cohesive set of responsive image improvements in the HTML Standard, moving context-specific quality/bandwidth trade-offs to declarative markup knobs while standardizing the baseline source selection algorithm across Chromium, Gecko, and WebKit:

  1. Normative source selection algorithm (replacing "implementation-defined" selection with deterministic normalization, ascending density sort, and optional local-cache reuse of already-available higher-resolution candidates): Responsive images: should we define source selection normatively instead of leaving it implementation-defined whatwg/html#13077
  2. Per-image density bounds (mindensity and maxdensity on <img> and <source>): Authors have no way to ask for a higher or lower pixel density than the browser's default when selecting from srcset whatwg/html#13069
  3. 2D sizes (cover / contain), h descriptors in srcset, object-fit-aware sizes="auto", and fixing unexpected upscaling under object-fit: scale-down / none: sizes=auto images shouldn't use concrete object width to select source whatwg/html#12248, Responsive images with srcset unexpectedly upscale when using object-fit: none or scale-down whatwg/html#11428, Support 2D sizes and height descriptors in srcset whatwg/html#13053
  4. True unscaled intrinsic dimension and aspect ratio getters (imageWidth, imageHeight, and imageAspectRatio on HTMLImageElement): No way to read an image's true intrinsic dimensions when sizes="auto" (or any w-descriptor srcset) is used whatwg/html#12565, Make sizes determine the natural width of img whatwg/html#13046

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions