From 9b5ffe8062a26db94031aa3ac5ded121b5c0b186 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 1 Dec 2015 20:58:24 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@35755 git-svn-id: http://core.svn.wordpress.org/trunk@35719 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index 06c27cbc7f..ddd7088a1d 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1061,8 +1061,8 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac $image_ratio_compare = 0; } - // If the new ratio differs by less than 0.01, use it. - if ( abs( $image_ratio - $image_ratio_compare ) < 0.01 ) { + // If the new ratio differs by less than 0.002, use it. + if ( abs( $image_ratio - $image_ratio_compare ) < 0.002 ) { // Add the URL, descriptor, and value to the sources array to be returned. $sources[ $image['width'] ] = array( 'url' => $image_baseurl . $image['file'], diff --git a/wp-includes/version.php b/wp-includes/version.php index 24ac067a7d..f48a1aef2f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-RC1-35754'; +$wp_version = '4.4-RC1-35755'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.