Qualifier
abstract class Qualifier
Defines how to apply a particular transformation.
Methods
Sets the crop mode.
Controls how much of the original image surrounding the face to keep when using either the 'crop' or 'thumb' cropping modes with face detection.
Sets the width of the asset.
Sets the height of the asset.
Sets the aspect ratio of the asset.
Sets the device pixel ratio.
Sets the x position in pixels.
Sets the y position in pixels.
Injects a custom function into the image transformation pipeline.
Sets the overlay source.
Sets the underlay source.
Sets the angle of the rotation of the asset.
Sets the color.
Defines the background color to use.
Adds a border around the image.
Sets the flag.
Controls the compression quality for images and videos.
Adjusts the opacity of the image and makes it semi-transparent.
Rounds the corners of an asset.
Sets the starting position of the part of the video to keep when trimming videos.
Sets the end position of the part of the video to keep when trimming videos.
Sets the duration of the video to keep.
Sets up a conditional transformation.
Sets the audio codec or removes the audio channel.
Sets the audio sample frequency.
Controls the video bitrate.
Controls the range of acceptable FPS (Frames Per Second) to ensure that video (even when optimized) is delivered with an expected FPS level (helps with sync to audio).
Controls the range of acceptable FPS (Frames Per Second) to ensure that video (even when optimized) is delivered with an expected FPS level (helps with sync to audio).
Sets the keyframe interval of the delivered video.
Sets the streaming profile to apply to an HLS or MPEG-DASH adaptive bitrate streaming video.
Sets the total number of frames to sample from the original video.
Extracts the specified page(s).
Sets the file format.
Controls the color space used for the delivered image.
Specifies the ICC profile to use for the color space.
Default images can be used in the case that a requested image does not exist.
Controls the time delay between the frames of an animated image, in milliseconds.
Controls the density to use when delivering an image or when converting a vector file such as a PDF or EPS document to a web image delivery format.
Prevents style class names collisions for sprite generation.
Determines which part of the image to keep when any part of the image is cropped. For overlays, this setting determines where to place the overlay.
Applies a pre-defined transformation to the asset.
Injects a custom function into the image transformation pipeline.
Sets any qualifier to any value.
Details
static CropMode
cropMode(string $cropModeName)
Sets the crop mode.
static Zoom
zoom(float $zoom)
Controls how much of the original image surrounding the face to keep when using either the 'crop' or 'thumb' cropping modes with face detection.
static Width
width(int|float $width)
Sets the width of the asset.
static Height
height(int|float $height)
Sets the height of the asset.
static AspectRatio
aspectRatio(float|array ...$aspectRatio)
Sets the aspect ratio of the asset.
static Dpr
dpr(float $dpr)
Sets the device pixel ratio.
static X
x(int $x)
Sets the x position in pixels.
static Y
y(int $y)
Sets the y position in pixels.
static EffectQualifier
effect(string $effectName, mixed ...$values)
Injects a custom function into the image transformation pipeline.
static ImageSource
overlay(string|mixed $source)
Sets the overlay source.
static ImageSource
underlay(string|mixed $source)
Sets the underlay source.
static Angle
angle(int|string|array|mixed ...$degree)
Sets the angle of the rotation of the asset.
static ColorQualifier
color(string $color)
Sets the color.
static Background
background(array ...$value)
Defines the background color to use.
This applies to various scenarios including: * Defining the color to use instead of transparent background areas when converting to a format that does not support transparency * Using the pad crop mode * Setting the color behind a text overlay * Setting the color behind subtitles
static BorderQualifier
border(array ...$value)
Adds a border around the image.
static FlagQualifier
flag(string $flagName, string|array|mixed $value = null)
Sets the flag.
static QualityQualifier
quality(int $level, null|string $preset = null)
Controls the compression quality for images and videos.
Reducing the quality is a trade-off between visual quality and file size.
static Opacity
opacity(int $level)
Adjusts the opacity of the image and makes it semi-transparent.
static CornerRadius
cornerRadius(array ...$value)
Rounds the corners of an asset.
static StartOffset
startOffset(mixed $startOffset)
Sets the starting position of the part of the video to keep when trimming videos.
static EndOffset
endOffset(mixed $endOffset)
Sets the end position of the part of the video to keep when trimming videos.
static Duration
duration(mixed $duration)
Sets the duration of the video to keep.
static IfCondition
ifCondition(string $expression)
Sets up a conditional transformation.
static AudioCodec
audioCodec(string $audioCodec)
Sets the audio codec or removes the audio channel.
static AudioFrequency
audioFrequency(string $audioFrequency)
Sets the audio sample frequency.
static BitRate
bitRate(int|string $bitRate, null|string $type = null)
Controls the video bitrate.
Supported codecs: h264, h265 (MPEG-4); vp8, vp9 (WebM).
static Fps
fps(int|null $min = null, int|null $max = null)
Controls the range of acceptable FPS (Frames Per Second) to ensure that video (even when optimized) is delivered with an expected FPS level (helps with sync to audio).
static Fps
fpsRange(int|null $min = null, int|null $max = null)
Controls the range of acceptable FPS (Frames Per Second) to ensure that video (even when optimized) is delivered with an expected FPS level (helps with sync to audio).
static KeyframeInterval
keyframeInterval(int $interval)
Sets the keyframe interval of the delivered video.
static StreamingProfile
streamingProfile(string $streamingProfile)
Sets the streaming profile to apply to an HLS or MPEG-DASH adaptive bitrate streaming video.
The value can be one of the pre-defined streaming profiles or a custom-defined one. You can use the streaming profiles methods of StreamingProfilesTrait to get a list of the available streaming profiles or to create new custom profiles.
static VideoSampling
videoSampling(int|string $value)
Sets the total number of frames to sample from the original video.
Relevant when converting videos to animated GIF or WebP format. If not specified, the resulting GIF or WebP samples the whole video (up to 400 frames, at up to 10 frames per second). By default the duration of the animated image is the same as the duration of the video, no matter how many frames are sampled from the original video (use the delay qualifier to adjust the amount of time between frames).
static PageQualifier
page(int|string|array|mixed $page)
Extracts the specified page(s).
static FormatQualifier
format(string $format)
Sets the file format.
static ColorSpace
colorSpace(string $colorSpace)
Controls the color space used for the delivered image.
Use the constants defined in \Cloudinary\Transformation\ColorSpace for $colorSpace.
static ColorSpace
colorSpaceFromIcc(string $publicId)
Specifies the ICC profile to use for the color space.
The ICC file must be uploaded to your cloud as a raw, authenticated file.
Alias for ColorSpace::icc
static DefaultImage
defaultImage(string $defaultImage)
Default images can be used in the case that a requested image does not exist.
static Delay
delay(int $delay)
Controls the time delay between the frames of an animated image, in milliseconds.
static Density
density(int|string $density)
Controls the density to use when delivering an image or when converting a vector file such as a PDF or EPS document to a web image delivery format.
static Prefix
prefix(string $prefix)
Prevents style class names collisions for sprite generation.
static GravityQualifier
gravity(mixed $gravity)
Determines which part of the image to keep when any part of the image is cropped. For overlays, this setting determines where to place the overlay.
static NamedTransformation
namedTransformation(string $transformationName)
Applies a pre-defined transformation to the asset.
static CustomFunction
customFunction(string $source, string $type = null, bool $preprocess = false)
Injects a custom function into the image transformation pipeline.
static GenericQualifier
generic(string $genericKey, mixed ...$value)
Sets any qualifier to any value.
For future compatibility.