[wp-trac] [WordPress Trac] #38906: wp_get_attachment_image_src() sometimes gives incorrect width and height values

WordPress Trac noreply at wordpress.org
Wed Dec 21 16:48:42 UTC 2022


#38906: wp_get_attachment_image_src() sometimes gives incorrect width and height
values
--------------------------+-----------------------------
 Reporter:  pressupinc    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Future Release
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  administration
--------------------------+-----------------------------
Changes (by desrosj):

 * keywords:  close =>
 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 While I don't disagree that this is likely not truly a bug (listing the
 size the image will be inserted into the editor at is reasonable), I do
 think it's quite confusing. Especially when image sizes have names like
 `2048x2048` and don't match the listed dimensions.

 I'd also like to know, does this only surface in "classic" editing
 contexts? Is this still present when inserting images using the
 image/media blocks? Content width is handled a bit differently in themes
 and block because of cover image blocks, etc. Maybe this way of listing
 image sizes no longer benefits users in more modern WordPress experiences.

 I'd love for the media team to have the chance to discuss this a bit more
 before closing out.

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


More information about the wp-trac mailing list