trait CommonFlagTrait

Trait LayerFlagTrait

Methods

attachment(string $filename = null)

Delivers the image as an attachment.

ignoreAspectRatio()

Allows specifying only either width or height so the value of the second axis remains as is, and is not recalculated to maintain the aspect ratio of the original image.

forceIcc()

Adds ICC color space metadata to the image, even when the original image doesn't contain any ICC data.

forceStrip()

Instructs Cloudinary to clear all image meta-data (IPTC, Exif and XMP) while applying an incoming transformation.

getInfo()

Returns metadata of the input asset and of the transformed output asset in JSON instead of the transformed image.

immutableCache()

Sets the cache-control to immutable for the asset, which tells the browser that the asset does not have to be revalidated with the server when the page is refreshed, and can be loaded directly from the cache.

keepAttribution()

Keeps the copyright related fields when stripping meta-data. Without this flag, Cloudinary's default behavior is to strip all meta-data when generating new image transformations.

keepIptc()

Keeps all meta-data. Without this flag, Cloudinary's default behavior is to strip all meta-data when generating new image transformations.

generic(string $name, mixed ...$args)

Sets generic flag specified by name.

Details

static FlagQualifier attachment(string $filename = null)

Delivers the image as an attachment.

When the image's URL is accessed, tells the browser to save the image instead of embedding it in a page. You can optionally set the attachment's filename. If you don't specify a filename, then the original image’s filename will be used as the attachment filename (rather than the public_id) unless the discard_original_filename qualifier was set during the file upload.

Parameters

Name Type Description
$filename string The attachment's filename

Return Value

FlagQualifier

static FlagQualifier ignoreAspectRatio()

Allows specifying only either width or height so the value of the second axis remains as is, and is not recalculated to maintain the aspect ratio of the original image.

Return Value

FlagQualifier

static FlagQualifier forceIcc()

Adds ICC color space metadata to the image, even when the original image doesn't contain any ICC data.

Return Value

FlagQualifier

static FlagQualifier forceStrip()

Instructs Cloudinary to clear all image meta-data (IPTC, Exif and XMP) while applying an incoming transformation.

Return Value

FlagQualifier

static FlagQualifier getInfo()

Returns metadata of the input asset and of the transformed output asset in JSON instead of the transformed image.

When used with g_auto, the metadata includes the proposed g_auto cropping coordinates.

Return Value

FlagQualifier

static FlagQualifier immutableCache()

Sets the cache-control to immutable for the asset, which tells the browser that the asset does not have to be revalidated with the server when the page is refreshed, and can be loaded directly from the cache.

Currently supported only by Firefox.

Return Value

FlagQualifier

static FlagQualifier keepAttribution()

Keeps the copyright related fields when stripping meta-data. Without this flag, Cloudinary's default behavior is to strip all meta-data when generating new image transformations.

Return Value

FlagQualifier

static FlagQualifier keepIptc()

Keeps all meta-data. Without this flag, Cloudinary's default behavior is to strip all meta-data when generating new image transformations.

Note that this flag cannot be used in conjunction with the automatic quality transformation (q_auto).

Return Value

FlagQualifier

static FlagQualifier generic(string $name, mixed ...$args)

Sets generic flag specified by name.

Parameters

Name Type Description
$name string The flag name.
...$args mixed The flag value.

Return Value

FlagQualifier