Make WordPress Core


Ignore:
Timestamp:
12/01/2015 08:57:42 PM (9 years ago)
Author:
wonderboymusic
Message:

Responsive Images: Currently images are included in the srcset if the aspect ratio difference is smaller than 0.01. This number is too high, set it to 0.002

Props joemcgill.
Fixes #34810.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r35753 r35755  
    10621062        }
    10631063
    1064         // If the new ratio differs by less than 0.01, use it.
    1065         if ( abs( $image_ratio - $image_ratio_compare ) < 0.01 ) {
     1064        // If the new ratio differs by less than 0.002, use it.
     1065        if ( abs( $image_ratio - $image_ratio_compare ) < 0.002 ) {
    10661066            // Add the URL, descriptor, and value to the sources array to be returned.
    10671067            $sources[ $image['width'] ] = array(
Note: See TracChangeset for help on using the changeset viewer.