Skip to content
PHP Ecosystem
Explore

HasImageSizes

API reference › HTML Attribute › HasImageSizes

traitUIAwesome\Html\Attribute\HasImageSizes
Sourcesrc/HasImageSizes.php
Used by 1 type

Provides an immutable API for the imagesizes attribute.

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link#imagesizes.

MethodDescriptionDefined by
imagesizes()Sets the imagesizes attribute.HasImageSizes
public function imagesizes(string|Stringable|UnitEnum|null $value): static

Sets the imagesizes attribute.

Defines the image sizes descriptor list for preload links.

Parameters

ParameterTypeDescription
$valuestring|Stringable|UnitEnum|nullImage sizes descriptor list, or null to remove the attribute.

Returns

static: New instance with the updated imagesizes attribute.