-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Media: Avoid images with
sizes=auto
to be displayed downsized in su…
…pporting browsers. Based on the user agent stylesheet rules outlined in https://html.spec.whatwg.org/multipage/rendering.html#img-contain-size, images that have `sizes=auto` while applying `width: auto` or `width: fit-content` would be constrained to only 300px width. This changeset overrides said user agent stylesheet rule with a much larger constraint, to avoid the problem. Additionally, it introduces a filter `wp_img_tag_add_auto_sizes` which can be used to opt out of the functionality, as an additional measure. Props joemcgill, flixos90, dooperweb, SirLouen, azaozz, mukesh27, apermo. Fixes #62413. See #61847, #62345. Built from https://develop.svn.wordpress.org/trunk@59415 git-svn-id: https://core.svn.wordpress.org/trunk@58801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Loading branch information
1 parent
5041af9
commit d61bb2c
Showing
3 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters