-
Notifications
You must be signed in to change notification settings - Fork 23k
Description
MDN URL
What specific section or headline is this issue about?
Value
What information was incorrect, unhelpful, or incomplete?
The auto keyword is not documented.
What did you expect to see?
The auto keyword can be used for lazy-loaded images. This makes the browser use the rendered width of the image as the computed sizes value for selecting a candidate in srcset. The value must be exactly auto (case-insensitive) or start with auto, (case-insensitive). The width and height attributes should be used when using auto. The browser's default style will force size containment (so that the rendered size is not affected by loading the image) and contain-intrinsic-size will be 300px 150px (this can be overridden by author CSS or the width/height attributes).
When using auto-sizes with picture, the auto keyword is required on the img element. The sizes attribute can be omitted on source elements.
Do you have any supporting links, references, or citations?
whatwg/html#8008
whatwg/html#9493
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/api/htmlimageelement/sizes - MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/htmlimageelement/sizes/index.md
- Last commit: acfe8c9
- Document last modified: 2023-07-07T07:19:19.000Z