[wp-trac] [WordPress Trac] #50367: Avoid layout shifting due to images not having dimension attributes
WordPress Trac
noreply at wordpress.org
Thu Jun 25 20:03:37 UTC 2020
#50367: Avoid layout shifting due to images not having dimension attributes
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.5
Component: Media | Version:
Severity: normal | Resolution:
Keywords: needs-unit-tests needs-patch needs- | Focuses:
testing |
-------------------------------------------------+-------------------------
Changes (by azaozz):
* keywords: has-patch has-unit-tests => needs-unit-tests needs-patch
needs-testing
* status: closed => reopened
* resolution: fixed =>
Comment:
There seems to be a bug with this patch when an img tag has either `width`
or `height` set (but not both).
To test:
- Create new post with an image.
- Switch to Code/Text view and insert a `width="100"` in the img tag.
- Save and preview.
On the front-end the img tag has `width="100"` but also `height="900"`
(coming from the image file dimensions).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50367#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list