GravitySmart
Gravity on the most interesting part of the image, as detected by imgproxy.
imgproxy: gravity (alias g) · Availability: all editions
use SomehowDigital\ImgProxy\Url;use SomehowDigital\ImgProxy\Option\GravitySmart;
$url = Url::create() ->source('https://example.com/image.jpg') ->options(new GravitySmart());
$url->build();// _/g:sm/plain/https%3A%2F%2Fexample.com%2Fimage.jpgThe option appears in the URL as g:sm.
This option takes no parameters.
- Not allowed for
ExtendandExtendAspectRatio.