[wp-trac] [WordPress Trac] #35030: Responsive Images: wrong source selected in iOS8

WordPress Trac noreply at wordpress.org
Thu Mar 17 21:46:38 UTC 2016


#35030: Responsive Images: wrong source selected in iOS8
--------------------------------------+------------------------
 Reporter:  tonysandwich              |       Owner:  joemcgill
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:  4.5
Component:  Media                     |     Version:  4.4
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------

Comment (by jaspermdegroot):

 @azaozz

 You mean after the filter so we don't have to preserve the keys anymore?
 That's also an option.
 Only thing to keep in mind is that we have to find the src image in the
 `$sources` array by its URL. The width from `$size_array` doesn't match
 with the image width used as key in `$sources` when an image is
 constrained to the content width.

 In my patch I added `$is_src` so we only check once if current image is
 the src image. I suggest we keep that part to improve performance, even if
 we don't need that variable anymore for to fix this issue.

 I guess we don't have to make any changes in existing tests if we only
 change the array order for iOS. The test that I added for this ticket
 could be updated so it sets global `$is_iphone` (includes iPads) to
 `true`.

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


More information about the wp-trac mailing list