WatermarkSize
Sets the size of the watermark.
imgproxy: watermark_size (alias wms) · Availability: imgproxy Pro only
use SomehowDigital\ImgProxy\Url;use SomehowDigital\ImgProxy\Option\WatermarkSize;
$url = Url::create() ->source('https://example.com/image.jpg') ->options(new WatermarkSize(100, 50));
$url->build();// _/wms:100:50/plain/https%3A%2F%2Fexample.com%2Fimage.jpgThe option appears in the URL as wms:100:50.
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
$width |
int |
required | Width of the watermark. |
$height |
int |
required | Height of the watermark. |
- Only applies when the watermark scale is
0.