[wp-trac] [WordPress Trac] #34955: The choices of images to add to srcset shouldn't be via a ratio
WordPress Trac
noreply at wordpress.org
Thu Dec 10 15:24:46 UTC 2015
#34955: The choices of images to add to srcset shouldn't be via a ratio
--------------------------------------+------------------------
Reporter: smerriman | Owner: joemcgill
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4.1
Component: Media | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------
Comment (by joemcgill):
Thanks @jaspermdegroot.
[attachment:34955.2.diff] fixes the typo in the inline doc. While I share
your concern about possible edge cases with double rounding in the
process, we can't rely on the full size image because this also needs to
be useful in cases where we are finding possible `srcset` matches to a
hard cropped image in the `src`. In those cases, the full size would have
the wrong aspect ratio.
I wish I could think of a better way of testing for this edge case. While
the test included does illustrate the issue, it still feels a bit
arbitrary.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34955#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list