class ImageAsset implements Asset

Image asset.

Properties

$width
$height

Methods

__construct(string $url, string|null $mimeType = null, string|null $file = null, int|null $width = null, int|null $height = null, string|null $alternative = null, bool $lazyLoad = false, int $density = 1, string|bool|null $crossorigin = null)

No description

string
__toString()

Allows direct echoing of the object to get the URL.

Details

at line 19
__construct(string $url, string|null $mimeType = null, string|null $file = null, int|null $width = null, int|null $height = null, string|null $alternative = null, bool $lazyLoad = false, int $density = 1, string|bool|null $crossorigin = null)

No description

Parameters

string $url
string|null $mimeType
string|null $file
int|null $width
int|null $height
string|null $alternative
bool $lazyLoad
int $density
string|bool|null $crossorigin

at line 40
string __toString()

Allows direct echoing of the object to get the URL.

Return Value

string

Traits

Lazy-loading of properties as a workaround for PHP < 8.4.