trait TransformationDeliveryTrait

Trait TransformationDeliveryTrait

Here we add the most common 'aliases' for building transformation at the top level

Methods

delivery(mixed $delivery)

Applies delivery action.

format(Format|string $format)

Forces format conversion to the given format.

quality(int|string|Quality $quality)

Controls compression quality. 1 is the lowest quality and 100 is the highest.

dpr(float|string $dpr)

Deliver the image in the specified device pixel ratio.

Details

TransformationDeliveryTrait delivery(mixed $delivery)

Applies delivery action.

Parameters

Name Type Description
$delivery mixed The delivery action to apply.

Return Value

TransformationDeliveryTrait

TransformationDeliveryTrait format(Format|string $format)

Forces format conversion to the given format.

(Formerly known as fetch format)

Parameters

Name Type Description
$format Format|string

Return Value

TransformationDeliveryTrait

TransformationDeliveryTrait quality(int|string|Quality $quality)

Controls compression quality. 1 is the lowest quality and 100 is the highest.

Reducing the quality is a trade-off between visual quality and file size.

Parameters

Name Type Description
$quality int|string|Quality

Return Value

TransformationDeliveryTrait

TransformationDeliveryTrait dpr(float|string $dpr)

Deliver the image in the specified device pixel ratio.

Parameters

Name Type Description
$dpr float|string Any positive float value.

Return Value

TransformationDeliveryTrait