diff --git a/lib/Images.php b/lib/Images.php index 2b64d84c..35541021 100644 --- a/lib/Images.php +++ b/lib/Images.php @@ -35,7 +35,7 @@ public static function imgixUrl($originalUrl, $options = []) $builder->setSignKey($imgixConfig['signKey']); $builder->setIncludeLibraryParam(false); - $defaults = array('auto' => "compress,format", 'crop' => 'entropy', 'fit' => 'crop'); + $defaults = array('auto' => "compress,format", 'crop' => 'faces,edge', 'fit' => 'crop'); $params = array_replace_recursive($defaults, $options); return $builder->createURL($parsedUri->getPath(), $params); } else { diff --git a/tests/ImagesTest.php b/tests/ImagesTest.php index 78736c6b..ec17c3fc 100644 --- a/tests/ImagesTest.php +++ b/tests/ImagesTest.php @@ -9,12 +9,12 @@ final class ImagesTest extends TestCase public function testBuildsImgixUrl(): void { $this->assertRegExp( - '/image\.jpg\?auto=compress%2Cformat&crop=entropy&fit=crop&s=.*$/', + '/image\.jpg\?auto=compress%2Cformat&crop=faces%2Cedge&fit=crop&s=.*$/', Images::imgixUrl("https://media.example.com/path/to/image.jpg") ); $this->assertRegExp( - '/image\.jpg\?auto=compress%2Cformat&crop=entropy&fit=crop&w=100&s=.*$/', + '/image\.jpg\?auto=compress%2Cformat&crop=faces%2Cedge&fit=crop&w=100&s=.*$/', Images::imgixUrl("https://media.example.com/path/to/image.jpg", ['w' => 100]) ); }