-
Notifications
You must be signed in to change notification settings - Fork 98
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. Reviewed by desrosj, joemcgill. Merges [59415] to the 6.7 branch. Props joemcgill, flixos90, dooperweb, SirLouen, azaozz, mukesh27, apermo. Fixes #62413. See #61847, #62345. Built from https://develop.svn.wordpress.org/branches/6.7@59435 git-svn-id: http://core.svn.wordpress.org/branches/6.7@58821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Loading branch information
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