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

WordPress Trac noreply at wordpress.org
Fri Aug 21 08:40:20 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:  Media         |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by litemotiv):

 A problem for many sites lies in the fact that previously images in rows
 of columns automatically got the same height:

 [5.4]

 [[Image(https://i.imgur.com/tD3HCJW.jpg)]]

 The new forced width and height attributes then stretch an image without
 height:auto in the css:

 [5.5]

 [[Image(https://i.imgur.com/ygGYrA5.jpeg)]]

 Adding height:auto does fix the stretching, but it also causes all images
 to get different heights, making it impossible to create grids/rows of
 images with aligning heights:

 [5.5 with height:auto]

 [[Image(https://i.imgur.com/pnIC0kE.jpg)]]

 So what would be the solution to restore that behavior?

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


More information about the wp-trac mailing list