Height
Sets the height of the resulting image.
imgproxy: height (alias h) · Availability: all editions
use SomehowDigital\ImgProxy\Url;use SomehowDigital\ImgProxy\Option\Height;
$url = Url::create() ->source('https://example.com/image.jpg') ->options(new Height(200));
$url->build();// _/h:200/plain/https%3A%2F%2Fexample.com%2Fimage.jpgThe option appears in the URL as h:200.
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
$height |
int |
required | Height in pixels. 0 derives the height from the width and the aspect ratio. |
- With the
forceresizing type,0keeps the original height.