FallbackImageUrl
Sets an image that is served when the source cannot be loaded.
imgproxy: fallback_image_url (alias fiu) · Availability: imgproxy Pro only
use SomehowDigital\ImgProxy\Url;use SomehowDigital\ImgProxy\Option\FallbackImageUrl;
$url = Url::create() ->source('https://example.com/image.jpg') ->options(new FallbackImageUrl('https://example.com/fallback.jpg'));
$url->build();// _/fiu:aHR0cHM6Ly9leGFtcGxlLmNvbS9mYWxsYmFjay5qcGc/plain/https%3A%2F%2Fexample.com%2Fimage.jpgThe option appears in the URL as fiu:aHR0cHM6Ly9leGFtcGxlLmNvbS9mYWxsYmFjay5qcGc.
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
$url |
string |
required | The URL of the fallback image, without any encoding. |
- The library Base64-encodes the URL.