Skip to content
PHP Ecosystem
Explore

HasImageSrcSet

API reference › HTML Attribute › HasImageSrcSet

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

Provides an immutable API for the imagesrcset attribute.

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

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

Sets the imagesrcset attribute.

Defines the image srcset descriptor list for preload links.

Parameters

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

Returns

static: New instance with the updated imagesrcset attribute.