Skip to content

Class: GroupElementChain ​

Defined in: fluent/chains.ts:141

A chainable group element — full image operation surface.

Extends ​

Properties ​

kind ​

ts
readonly kind: "group-element";

Defined in: fluent/chains.ts:143

Discriminant for chains returned by cdn.parse.

Accessors ​

href ​

Get Signature ​

ts
get href(): string;

Defined in: fluent/chains.ts:156

The serialized URL.

Returns ​

string


operations ​

Get Signature ​

ts
get operations(): CdnOperation[];

Defined in: fluent/chain-base.ts:164

The operations accumulated so far (defensive copy).

Returns ​

CdnOperation[]

Inherited from ​

ImageChain.operations

Methods ​

autorotate() ​

ts
autorotate(enabled): this;

Defined in: fluent/image-chain.ts:74

Appends autorotate; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
enabledboolean

Returns ​

this

Inherited from ​

ImageChain.autorotate


base() ​

ts
base(cdnBase): this;

Defined in: fluent/chains.ts:146

Rebases the chain onto another cdnBase (trailing slash tolerated).

Parameters ​

ParameterType
cdnBasestring

Returns ​

this


blur() ​

ts
blur(strength?, amount?): this;

Defined in: fluent/image-chain.ts:136

Appends blur; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
strength?number
amount?number

Returns ​

this

Inherited from ​

ImageChain.blur


blurRegion() ​

ts
blurRegion(options): this;

Defined in: fluent/image-chain.ts:140

Appends blurRegion; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
optionsBlurRegionOptions

Returns ​

this

Inherited from ​

ImageChain.blurRegion


borderRadius() ​

ts
borderRadius(radii, verticalRadii?): this;

Defined in: fluent/image-chain.ts:62

Appends borderRadius; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
radiiRadii
verticalRadii?Radii

Returns ​

this

Inherited from ​

ImageChain.borderRadius


brightness() ​

ts
brightness(value): this;

Defined in: fluent/image-chain.ts:92

Appends brightness; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
valuenumber

Returns ​

this

Inherited from ​

ImageChain.brightness


contrast() ​

ts
contrast(value): this;

Defined in: fluent/image-chain.ts:104

Appends contrast; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
valuenumber

Returns ​

this

Inherited from ​

ImageChain.contrast


crop() ​

ts
crop(
   width, 
   height, 
   align?
): this;

Defined in: fluent/image-chain.ts:31

Appends crop; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
widthSizeValue
heightSizeValue
align?Alignment

Returns ​

this

Inherited from ​

ImageChain.crop


cropByRatio() ​

ts
cropByRatio(ratio, align?): this;

Defined in: fluent/image-chain.ts:39

Appends cropByRatio; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
ratiostring
align?Alignment

Returns ​

this

Inherited from ​

ImageChain.cropByRatio


cropByTag() ​

ts
cropByTag(tag, options?): this;

Defined in: fluent/image-chain.ts:43

Appends cropByTag; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
tagCropTag
options?{ align?: Alignment; ratio?: string; size?: readonly [SizeValue, SizeValue]; }
options.align?Alignment
options.ratio?string
options.size?readonly [SizeValue, SizeValue]

Returns ​

this

Inherited from ​

ImageChain.cropByTag


enhance() ​

ts
enhance(strength?): this;

Defined in: fluent/image-chain.ts:120

Appends enhance; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
strength?number

Returns ​

this

Inherited from ​

ImageChain.enhance


exposure() ​

ts
exposure(value): this;

Defined in: fluent/image-chain.ts:96

Appends exposure; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
valuenumber

Returns ​

this

Inherited from ​

ImageChain.exposure


filename() ​

ts
filename(filename): this;

Defined in: fluent/chains.ts:151

Sets (or clears) the trailing filename.

Parameters ​

ParameterType
filenamestring | null

Returns ​

this


filter() ​

ts
filter(name, amount?): this;

Defined in: fluent/image-chain.ts:132

Appends filter; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
name| "adaris" | "briaril" | "calarel" | "carris" | "cynarel" | "cyren" | "elmet" | "elonni" | "enzana" | "erydark" | "fenralan" | "ferand" | "galen" | "gavin" | "gethriel" | "iorill" | "iothari" | "iselva" | "jadis" | "lavra" | "misiara" | "namala" | "nerion" | "nethari" | "pamaya" | "sarnar" | "sedis" | "sewen" | "sorahel" | "sorlen" | "tarian" | "thellassan" | "varriel" | "varven" | "vevera" | "virkas" | "yedis" | "yllara" | "zatvel" | "zevcen"
amount?number

Returns ​

this

Inherited from ​

ImageChain.filter


flip() ​

ts
flip(): this;

Defined in: fluent/image-chain.ts:82

Appends flip; mirrors the creator in @uploadcare/cdn-url/ops.

Returns ​

this

Inherited from ​

ImageChain.flip


font() ​

ts
font(options): this;

Defined in: fluent/image-chain.ts:223

Appends font; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
optionsFontOptions

Returns ​

this

Inherited from ​

ImageChain.font


format() ​

ts
format(value): this;

Defined in: fluent/image-chain.ts:170

Appends format; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
value"auto" | "preserve" | "webp" | "jpeg" | "png"

Returns ​

this

Inherited from ​

ImageChain.format


gamma() ​

ts
gamma(value): this;

Defined in: fluent/image-chain.ts:100

Appends gamma; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
valuenumber

Returns ​

this

Inherited from ​

ImageChain.gamma


getAllOps() ​

ts
getAllOps(ref): CdnOperation[];

Defined in: fluent/chain-base.ts:129

Every matching operation, in chain order. Mirrors CdnUrl.getAll.

Parameters ​

ParameterType
refOperationRef

Returns ​

CdnOperation[]

Example ​

ts
chain.getAllOps('overlay') // → [{ name: 'overlay', … }, …]

Inherited from ​

ImageChain.getAllOps


getOp() ​

ts
getOp(ref): CdnOperation | null;

Defined in: fluent/chain-base.ts:117

First matching operation, or null. Mirrors CdnUrl.get.

Parameters ​

ParameterType
refOperationRef

Returns ​

CdnOperation | null

Example ​

ts
myCdn.file(uuid).quality('smart').getOp('quality')
// → { name: 'quality', params: ['smart'] }

Inherited from ​

ImageChain.getOp


grayscale() ​

ts
grayscale(): this;

Defined in: fluent/image-chain.ts:124

Appends grayscale; mirrors the creator in @uploadcare/cdn-url/ops.

Returns ​

this

Inherited from ​

ImageChain.grayscale


hasOp() ​

ts
hasOp(ref): boolean;

Defined in: fluent/chain-base.ts:104

Whether a matching operation is present. Mirrors CdnUrl.has; named with the Op suffix so it can never collide with a transformation method.

Parameters ​

ParameterType
refOperationRef

Returns ​

boolean

Example ​

ts
myCdn.file(uuid).quality('smart').hasOp(quality) // → true

Inherited from ​

ImageChain.hasOp


inline() ​

ts
inline(enabled): this;

Defined in: fluent/image-chain.ts:186

Appends inline; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
enabledboolean

Returns ​

this

Inherited from ​

ImageChain.inline


invert() ​

ts
invert(): this;

Defined in: fluent/image-chain.ts:128

Appends invert; mirrors the creator in @uploadcare/cdn-url/ops.

Returns ​

this

Inherited from ​

ImageChain.invert


json() ​

ts
json(): this;

Defined in: fluent/image-chain.ts:160

Appends json; mirrors the creator in @uploadcare/cdn-url/ops.

Returns ​

this

Inherited from ​

ImageChain.json


jsonp() ​

ts
jsonp(): this;

Defined in: fluent/image-chain.ts:164

Appends jsonp; mirrors the creator in @uploadcare/cdn-url/ops.

Returns ​

this

Inherited from ​

ImageChain.jsonp


mainColors() ​

ts
mainColors(count?): this;

Defined in: fluent/image-chain.ts:156

Appends mainColors; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
count?number

Returns ​

this

Inherited from ​

ImageChain.mainColors


maxIccSize() ​

ts
maxIccSize(kb): this;

Defined in: fluent/image-chain.ts:152

Appends maxIccSize; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
kbnumber

Returns ​

this

Inherited from ​

ImageChain.maxIccSize


mirror() ​

ts
mirror(): this;

Defined in: fluent/image-chain.ts:86

Appends mirror; mirrors the creator in @uploadcare/cdn-url/ops.

Returns ​

this

Inherited from ​

ImageChain.mirror


op() ​

ts
op(name, ...params): this;

Defined in: fluent/chain-base.ts:58

Appends an arbitrary operation without validation (escape hatch).

Parameters ​

ParameterType
namestring
...paramsstring[]

Returns ​

this

Inherited from ​

ImageChain.op


overlay() ​

ts
overlay(source, options?): this;

Defined in: fluent/image-chain.ts:196

Appends overlay; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
sourceOverlaySource
options?OverlayOptions

Returns ​

this

Inherited from ​

ImageChain.overlay


preview() ​

ts
preview(width?, height?): this;

Defined in: fluent/image-chain.ts:15

Appends preview; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
width?number
height?number

Returns ​

this

Inherited from ​

ImageChain.preview


progressive() ​

ts
progressive(enabled): this;

Defined in: fluent/image-chain.ts:178

Appends progressive; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
enabledboolean

Returns ​

this

Inherited from ​

ImageChain.progressive


quality() ​

ts
quality(value): this;

Defined in: fluent/image-chain.ts:174

Appends quality; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
value| "normal" | "lighter" | "smart" | "better" | "best" | "lightest" | "smart_retina"

Returns ​

this

Inherited from ​

ImageChain.quality


rasterize() ​

ts
rasterize(): this;

Defined in: fluent/image-chain.ts:190

Appends rasterize; mirrors the creator in @uploadcare/cdn-url/ops.

Returns ​

this

Inherited from ​

ImageChain.rasterize


rect() ​

ts
rect(
   color, 
   size, 
   position
): this;

Defined in: fluent/image-chain.ts:203

Appends rect; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
colorstring
sizereadonly [SizeValue, SizeValue]
positionRelativePoint

Returns ​

this

Inherited from ​

ImageChain.rect


replaceAllOps() ​

ts
replaceAllOps(operation): this;

Defined in: fluent/chain-base.ts:157

Collapses every matching operation into one, kept at the position of the first match; appends when nothing matches. Mirrors CdnUrl.replaceAll.

Parameters ​

ParameterType
operationCdnOperation

Returns ​

this

Example ​

ts
chain.replaceAllOps({ name: 'overlay', params: [uuid] }).operations

Inherited from ​

ImageChain.replaceAllOps


replaceOp() ​

ts
replaceOp(operation): this;

Defined in: fluent/chain-base.ts:142

Replaces the first matching operation in place, or appends it. Mirrors CdnUrl.replace.

Parameters ​

ParameterType
operationCdnOperation

Returns ​

this

Example ​

ts
myCdn.file(uuid).resize({ width: 300 }).replaceOp(resize({ width: 500 })).href

Inherited from ​

ImageChain.replaceOp


resize() ​

ts
resize(dims): this;

Defined in: fluent/image-chain.ts:19

Appends resize; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
dims{ height?: number; width?: number; }
dims.height?number
dims.width?number

Returns ​

this

Inherited from ​

ImageChain.resize


rotate() ​

ts
rotate(angle): this;

Defined in: fluent/image-chain.ts:78

Appends rotate; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
anglenumber

Returns ​

this

Inherited from ​

ImageChain.rotate


saturation() ​

ts
saturation(value): this;

Defined in: fluent/image-chain.ts:108

Appends saturation; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
valuenumber

Returns ​

this

Inherited from ​

ImageChain.saturation


scaleCrop() ​

ts
scaleCrop(
   width, 
   height, 
   options?
): this;

Defined in: fluent/image-chain.ts:54

Appends scaleCrop; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
widthnumber
heightnumber
options?{ align?: Alignment; type?: | "smart" | "smart_faces_objects_points" | "smart_faces_objects" | "smart_faces_points" | "smart_objects_faces_points" | "smart_objects_faces" | "smart_objects_points" | "smart_points" | "smart_objects" | "smart_faces"; }
options.align?Alignment
options.type?| "smart" | "smart_faces_objects_points" | "smart_faces_objects" | "smart_faces_points" | "smart_objects_faces_points" | "smart_objects_faces" | "smart_objects_points" | "smart_points" | "smart_objects" | "smart_faces"

Returns ​

this

Inherited from ​

ImageChain.scaleCrop


setfill() ​

ts
setfill(color): this;

Defined in: fluent/image-chain.ts:66

Appends setfill; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
colorstring

Returns ​

this

Inherited from ​

ImageChain.setfill


sharp() ​

ts
sharp(strength?): this;

Defined in: fluent/image-chain.ts:144

Appends sharp; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
strength?number

Returns ​

this

Inherited from ​

ImageChain.sharp


smartResize() ​

ts
smartResize(width, height): this;

Defined in: fluent/image-chain.ts:23

Appends smartResize; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
widthnumber
heightnumber

Returns ​

this

Inherited from ​

ImageChain.smartResize


srgb() ​

ts
srgb(mode): this;

Defined in: fluent/image-chain.ts:148

Appends srgb; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
mode"fast" | "icc" | "keep_profile"

Returns ​

this

Inherited from ​

ImageChain.srgb


stretch() ​

ts
stretch(mode): this;

Defined in: fluent/image-chain.ts:27

Appends stretch; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
mode"fill" | "off" | "on"

Returns ​

this

Inherited from ​

ImageChain.stretch


stripMeta() ​

ts
stripMeta(mode): this;

Defined in: fluent/image-chain.ts:182

Appends stripMeta; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
mode"all" | "none" | "sensitive"

Returns ​

this

Inherited from ​

ImageChain.stripMeta


text() ​

ts
text(
   size, 
   position, 
   value
): this;

Defined in: fluent/image-chain.ts:211

Appends text; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
sizereadonly [SizeValue, SizeValue]
positionRelativePoint
valuestring

Returns ​

this

Inherited from ​

ImageChain.text


textAlign() ​

ts
textAlign(halign, valign): this;

Defined in: fluent/image-chain.ts:219

Appends textAlign; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
halignTextHAlign
valignTextVAlign

Returns ​

this

Inherited from ​

ImageChain.textAlign


textBox() ​

ts
textBox(
   mode, 
   color?, 
   padding?, 
   borderRadius?
): this;

Defined in: fluent/image-chain.ts:227

Appends textBox; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
mode"fill" | "none" | "line" | "fit"
color?string
padding?number
borderRadius?number

Returns ​

this

Inherited from ​

ImageChain.textBox


toString() ​

ts
toString(): string;

Defined in: fluent/chains.ts:161

Alias of the terminal getter for string coercion.

Returns ​

string


trim() ​

ts
trim(tolerance?, padding?): this;

Defined in: fluent/image-chain.ts:35

Appends trim; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
tolerance?number
padding?string

Returns ​

this

Inherited from ​

ImageChain.trim


updateOperations() ​

ts
updateOperations(update): this;

Defined in: fluent/chain-base.ts:89

The primitive the other operation mutators are sugar over: rewrites the whole chain through a callback, preserving the chain subtype. Mirrors CdnUrl.updateOperations, and is the only way to edit by position — replacing the nth stackable operation, inserting at an index, or reordering. It is also the sole edit path for conversion chains (video/document/gif2video), which cannot be re-parsed from output.

The callback receives a defensive copy; whatever it returns becomes the new chain.

Parameters ​

ParameterType
update(current) => readonly CdnOperation[]

Returns ​

this

Example ​

ts
cdn.video(uuid).size({ width: 720 }).thumbs(5)
  .updateOperations((ops) =>
    ops.map((op) => (op.name === 'size' ? size({ width: 480 }) : op))
  ).path // → /uuid/video/-/size/480x/-/thumbs~5/

Inherited from ​

ImageChain.updateOperations


vibrance() ​

ts
vibrance(value): this;

Defined in: fluent/image-chain.ts:112

Appends vibrance; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
valuenumber

Returns ​

this

Inherited from ​

ImageChain.vibrance


warmth() ​

ts
warmth(value): this;

Defined in: fluent/image-chain.ts:116

Appends warmth; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
valuenumber

Returns ​

this

Inherited from ​

ImageChain.warmth


withoutOp() ​

ts
withoutOp(ref): this;

Defined in: fluent/chain-base.ts:66

Removes every occurrence of an operation. Accepts the operation name, an operation object, or the creator itself: chain.withoutOp(resize).

Parameters ​

ParameterType
refOperationRef

Returns ​

this

Inherited from ​

ImageChain.withoutOp


zoomObjects() ​

ts
zoomObjects(zoom): this;

Defined in: fluent/image-chain.ts:70

Appends zoomObjects; mirrors the creator in @uploadcare/cdn-url/ops.

Parameters ​

ParameterType
zoomnumber

Returns ​

this

Inherited from ​

ImageChain.zoomObjects