[wp-trac] [WordPress Trac] #50909: WordPress 5.5 update adds height and width attributes to images

WordPress Trac noreply at wordpress.org
Tue Aug 11 22:02:56 UTC 2020


#50909: WordPress 5.5 update adds height and width attributes to images
--------------------------+-----------------------------
 Reporter:  jeslen        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.5
 Severity:  critical      |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 It appears that some images added with the gutenberg editor (no updates
 since June) now have height and width attributes being dynamically added
 following the new loading attribute.

 I updated locally only so far.

 This is the previous img element being displayed in the browser:

 {{{
 <img src="https://www.brothersmoving.local/wp-
 content/uploads/2020/06/AdobeStock_230714251_Preview.jpeg" alt="Adobestock
 230714251 Preview" class="wp-image-8050"
 srcset="https://staging.brothersmoving.ca/wp-
 content/uploads/2020/06/AdobeStock_230714251_Preview.jpeg 1000w,
 https://staging.brothersmoving.ca/wp-content/uploads/2020/06
 /AdobeStock_230714251_Preview-300x134.jpeg 300w,
 https://staging.brothersmoving.ca/wp-content/uploads/2020/06
 /AdobeStock_230714251_Preview-768x344.jpeg 768w" sizes="(max-width:
 1000px) 100vw, 1000px">
 }}}


 This is it now:

 {{{
 <img loading="lazy" width="1000" height="448"
 src="https://www.brothersmoving.local/wp-
 content/uploads/2020/06/AdobeStock_230714251_Preview.jpeg" alt="Adobestock
 230714251 Preview" class="wp-image-8050"
 srcset="https://www.brothersmoving.local/wp-
 content/uploads/2020/06/AdobeStock_230714251_Preview.jpeg 1000w,
 https://www.brothersmoving.local/wp-content/uploads/2020/06
 /AdobeStock_230714251_Preview-300x134.jpeg 300w,
 https://www.brothersmoving.local/wp-content/uploads/2020/06
 /AdobeStock_230714251_Preview-768x344.jpeg 768w" sizes="(max-width:
 1000px) 100vw, 1000px">
 }}}

 These are the new attributes being added:

 {{{
  loading="lazy" width="1000" height="448"
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50909>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list