[wp-trac] [WordPress Trac] #50944: wp_calculate_image_srcset can unintentionally include unscaled original image

WordPress Trac noreply at wordpress.org
Thu Aug 20 06:43:39 UTC 2020


#50944: wp_calculate_image_srcset can unintentionally include unscaled original
image
--------------------------+---------------------
 Reporter:  fredrikll     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.5.1
Component:  Media         |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |     Focuses:
--------------------------+---------------------

Comment (by fredrikll):

 @khag7 the refactor in [35561] actually seems to be the issue. If the
 relevant `if` statement would still look like [35524], this bug would be
 fixed, from what I can tell.

 The difference should be quite clear if one looks closer: `isset(
 $image_sizes['thumbnail']['mime-type'] ) && 'image/gif' ===
 $image_sizes['thumbnail']['mime-type']` versus `! isset(
 $image_sizes['thumbnail']['mime-type'] ) || 'image/gif' !==
 $image_sizes['thumbnail']['mime-type']`

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


More information about the wp-trac mailing list