trait DimensionsQualifierTrait

Trait DimensionsQualifierTrait

Methods

width(int|float $width)

Sets the width of the asset.

height(int|float $height)

Sets the height of the asset.

aspectRatio(float|array ...$aspectRatio)

Sets the aspect ratio of the asset.

dpr(float $dpr)

Sets the device pixel ratio.

Details

static Width width(int|float $width)

Sets the width of the asset.

Parameters

Name Type Description
$width int|float The width in pixels (if an integer is specified) or as a percentage (if a float is specified).

Return Value

Width

See also

Width

static Height height(int|float $height)

Sets the height of the asset.

Parameters

Name Type Description
$height int|float The height in pixels (if an integer is specified) or as a percentage (if a float is specified).

Return Value

Height

See also

Height

static AspectRatio aspectRatio(float|array ...$aspectRatio)

Sets the aspect ratio of the asset.

Parameters

Name Type Description
...$aspectRatio float|array The new aspect ratio, specified as a percentage or ratio.

Return Value

AspectRatio

See also

AspectRatio

static Dpr dpr(float $dpr)

Sets the device pixel ratio.

Parameters

Name Type Description
$dpr float The device pixel ratio.

Return Value

Dpr

See also

Dpr