[wp-trac] [WordPress Trac] #45676: wp_get_attachment_img_srcset() ignores $size, and returns all $image_meta.

WordPress Trac noreply at wordpress.org
Tue Dec 18 22:25:46 UTC 2018


#45676: wp_get_attachment_img_srcset() ignores $size, and returns all $image_meta.
--------------------------+----------------------
 Reporter:  justlevine    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Media         |     Version:  5.0.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by peterwilsoncc):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 @justlevine,

 Thanks for the ticket and welcome to trac.

 `srcset` is intended to include images wider than the displayed size to
 allow for retina and other high density screens. For an image displayed at
 300 pixels wide on a `2x` display, a 600 pixel wide image is required;
 900px for a `3x` display. Browsers ''may'' take other issues into account
 when choosing which of the offered image sizes to display.

 I'm closing this ticket as invalid, which is trac's unfriendly way of
 noting the inclusion of these images is by design.

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


More information about the wp-trac mailing list