Style
Injects CSS into SVG sources.
imgproxy: style (alias st) · Availability: imgproxy Pro only
use SomehowDigital\ImgProxy\Url;use SomehowDigital\ImgProxy\Option\Style;
$url = Url::create() ->source('https://example.com/image.jpg') ->options(new Style('path{fill:#f00}'));
$url->build();// _/st:cGF0aHtmaWxsOiNmMDB9/plain/https%3A%2F%2Fexample.com%2Fimage.jpgThe option appears in the URL as st:cGF0aHtmaWxsOiNmMDB9.
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
$style |
string |
required | CSS, without any encoding. |
- The library Base64-encodes the CSS.