ResponsiveImagesCG/wp-tevko-responsive-images — pull request #11 by joemcgill (2014-12-31 05:28:39+00:00)
Title: Better handling of cropped images

This pull requests does a couple of things:

First, I've removed the initial check for custom image sizes that have been hard cropped and have replaced it with code that makes sure the ratio of each image size matches the ratio of the original. I'm rounding ratios to two decimal places to account for possible rounding discrepancies when an image is downsized to the nearest pixel.

Second, I've removed the logic that only returns sizes that are smaller than the original because there are definitely valid use cases for wanting to return larger image sizes in the `srcset` attribute if they are available (e.g., retina photos).

Additionally, I cleaned up a bit by removing the check for thumbnails, which is redundant at this point, and added a few formatting changes to be in line with the WP style (https://make.wordpress.org/core/handbook/coding-standards/php/).