[wp-trac] [WordPress Trac] #36154: wp_calculate_image_srcset() filters out square resized feature image

WordPress Trac noreply at wordpress.org
Mon Mar 7 11:32:26 UTC 2016


#36154: wp_calculate_image_srcset() filters out square resized feature image
--------------------------+-----------------------------
 Reporter:  solo14000     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.4.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hello,

 I'm using custom featured image sizes, especially a square version with
 cropping like add_image_size('my_image', 56, 56, true) for avatar purpose.

 When I want to generate the IMG HTML srcset attribute using
 wp_calculate_image_srcset() (media.php file), this function filters out
 all my square resized images. My original image aspect ratio is 1.42 (600
 x 853), so my apesct ratio difference between original and resized
 versions is 0.42, which is far from the limit one 0.002 in the source
 code.

 Could confirm?

 Thanks in advance

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36154>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list