[wp-trac] [WordPress Trac] #34931: Adding a filter to modify ratio differs when generating img srcset

WordPress Trac noreply at wordpress.org
Wed Dec 9 13:14:38 UTC 2015


#34931: Adding a filter to modify ratio differs when generating img srcset
-----------------------------------------+------------------------------
 Reporter:  mbcreation                   |       Owner:  joemcgill
     Type:  enhancement                  |      Status:  reviewing
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Media                        |     Version:  4.4
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:
-----------------------------------------+------------------------------
Changes (by joemcgill):

 * keywords:  has-patch => has-patch reporter-feedback
 * owner:   => joemcgill
 * status:  new => reviewing


Comment:

 Thanks @mbcreation!

 The way we're calculating ratio variance in `wp_calculate_image_srcset()`
 could probably be improved, but I hesitate to add a user filter, because
 that would open up the probability that images in a `srcset` are
 completely different crops than the original image, which would not be
 good.

 Are you encountering a use case where this filter would be helpful?

 Related: #34810.

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


More information about the wp-trac mailing list