ImageFlagTrait
trait ImageFlagTrait
Trait ImageFlagTrait
Methods
Used when delivering a video file as an image format that supports animation, such as animated WebP.
When used together with automatic quality (q_auto): allow switching to PNG8 encoding if the quality algorithm decides that it's more efficient.
When converting animated images to PNG format, generates an animated PNG from all the frames in the original animated file instead of only from the first still frame.
When converting animated images to WebP format, generate an animated WebP from all the frames in the original animated file instead of only from the first still frame.
Trims pixels according to a clipping path included in the original image (e.g., manually created using PhotoShop).
Trims pixels according to a clipping path included in the original image (e.g., manually created using PhotoShop) using an evenodd clipping rule.
Automatically use lossy compression when delivering animated GIF files.
When used with automatic fetch_format (f_auto): ensures that images with a transparency channel will be delivered in PNG format.
Generate PNG images in the PNG8 format.
Generates PNG images in the PNG24 format.
Generates PNG images in the PNG32 format.
Generates a JPG image using the progressive (interlaced) JPG format.
Reduces the image to one flat pixelated layer (as opposed to the default vector based graphic) in order to enable PDF resizing and overlay manipulations.
Instructs Cloudinary to run a sanitizer on the image (relevant only for the SVG format).
Instructs Cloudinary to clear all ICC color profile data included with the image.
Generates TIFF images using LZW compression and in the TIFF8 format.
A qualifier that ensures that an alpha channel is not applied to a TIFF image if it is a mask channel.
Details
static FlagQualifier
animated()
Used when delivering a video file as an image format that supports animation, such as animated WebP.
Plays all frames rather than just delivering the first one as a static image. Use this flag in addition to the flag or qualifier controlling the delivery format, for example f_auto or fl_awebp.
Note: When delivering a video in GIF format, it is delivered as an animated GIF by default and this flag is not necessary. To deliver a single frame of a video in GIF format, use the page qualifier.
static FlagQualifier
anyFormat()
When used together with automatic quality (q_auto): allow switching to PNG8 encoding if the quality algorithm decides that it's more efficient.
static FlagQualifier
animatedPng()
When converting animated images to PNG format, generates an animated PNG from all the frames in the original animated file instead of only from the first still frame.
Note that animated PNGs are not supported in all browsers and versions.
static FlagQualifier
animatedWebP()
When converting animated images to WebP format, generate an animated WebP from all the frames in the original animated file instead of only from the first still frame.
Note that animated WebPs are not supported in all browsers and versions.
static FlagQualifier
clip()
Trims pixels according to a clipping path included in the original image (e.g., manually created using PhotoShop).
static FlagQualifier
clipEvenOdd()
Trims pixels according to a clipping path included in the original image (e.g., manually created using PhotoShop) using an evenodd clipping rule.
static FlagQualifier
lossy()
Automatically use lossy compression when delivering animated GIF files.
This flag can also be used as a conditional flag for delivering PNG files: it tells Cloudinary to deliver the image in PNG format (as requested) unless there is no transparency channel - in which case deliver in JPEG format.
static FlagQualifier
preserveTransparency()
When used with automatic fetch_format (f_auto): ensures that images with a transparency channel will be delivered in PNG format.
static FlagQualifier
png8()
Generate PNG images in the PNG8 format.
static FlagQualifier
png24()
Generates PNG images in the PNG24 format.
static FlagQualifier
png32()
Generates PNG images in the PNG32 format.
static FlagQualifier
progressive(string $mode = null)
Generates a JPG image using the progressive (interlaced) JPG format.
This format allows the browser to quickly show a low-quality rendering of the image until the full-quality image is loaded.
static FlagQualifier
rasterize()
Reduces the image to one flat pixelated layer (as opposed to the default vector based graphic) in order to enable PDF resizing and overlay manipulations.
static FlagQualifier
sanitize()
Instructs Cloudinary to run a sanitizer on the image (relevant only for the SVG format).
static FlagQualifier
stripProfile()
Instructs Cloudinary to clear all ICC color profile data included with the image.
static FlagQualifier
tiff8Lzw()
Generates TIFF images using LZW compression and in the TIFF8 format.
static FlagQualifier
ignoreMaskChannels()
A qualifier that ensures that an alpha channel is not applied to a TIFF image if it is a mask channel.