CommonFlagTrait
trait CommonFlagTrait
Trait LayerFlagTrait
Methods
Delivers the image as an attachment.
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.
Adds ICC color space metadata to the image, even when the original image doesn't contain any ICC data.
Instructs Cloudinary to clear all image meta-data (IPTC, Exif and XMP) while applying an incoming transformation.
Returns metadata of the input asset and of the transformed output asset in JSON instead of the transformed image.
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.
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.
Keeps all meta-data. Without this flag, Cloudinary's default behavior is to strip all meta-data when generating new image transformations.
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.
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.
static FlagQualifier
forceIcc()
Adds ICC color space metadata to the image, even when the original image doesn't contain any ICC data.
static FlagQualifier
forceStrip()
Instructs Cloudinary to clear all image meta-data (IPTC, Exif and XMP) while applying an incoming transformation.
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.
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.
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.
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).
static FlagQualifier
generic(string $name, mixed ...$args)
Sets generic flag specified by name.