Class: ProxyChain
Defined in: fluent/chains.ts:167
A chainable delivery-proxy url over a remote source.
Extends
ImageChain<ParsedProxyUrl>
Properties
kind
readonly kind: "proxy";Defined in: fluent/chains.ts:169
Discriminant for chains returned by cdn.parse.
Accessors
href
Get Signature
get href(): string;Defined in: fluent/chains.ts:177
The serialized URL.
Returns
string
operations
Get Signature
get operations(): CdnOperation[];Defined in: fluent/chain-base.ts:164
The operations accumulated so far (defensive copy).
Returns
Inherited from
ImageChain.operations
Methods
autorotate()
autorotate(enabled): this;Defined in: fluent/image-chain.ts:74
Appends autorotate; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
enabled | boolean |
Returns
this
Inherited from
ImageChain.autorotate
blur()
blur(strength?, amount?): this;Defined in: fluent/image-chain.ts:136
Appends blur; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
strength? | number |
amount? | number |
Returns
this
Inherited from
ImageChain.blur
blurRegion()
blurRegion(options): this;Defined in: fluent/image-chain.ts:140
Appends blurRegion; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
options | BlurRegionOptions |
Returns
this
Inherited from
ImageChain.blurRegion
borderRadius()
borderRadius(radii, verticalRadii?): this;Defined in: fluent/image-chain.ts:62
Appends borderRadius; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
radii | Radii |
verticalRadii? | Radii |
Returns
this
Inherited from
ImageChain.borderRadius
brightness()
brightness(value): this;Defined in: fluent/image-chain.ts:92
Appends brightness; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
this
Inherited from
ImageChain.brightness
contrast()
contrast(value): this;Defined in: fluent/image-chain.ts:104
Appends contrast; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
this
Inherited from
ImageChain.contrast
crop()
crop(
width,
height,
align?
): this;Defined in: fluent/image-chain.ts:31
Appends crop; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
width | SizeValue |
height | SizeValue |
align? | Alignment |
Returns
this
Inherited from
ImageChain.crop
cropByRatio()
cropByRatio(ratio, align?): this;Defined in: fluent/image-chain.ts:39
Appends cropByRatio; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
ratio | string |
align? | Alignment |
Returns
this
Inherited from
ImageChain.cropByRatio
cropByTag()
cropByTag(tag, options?): this;Defined in: fluent/image-chain.ts:43
Appends cropByTag; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
tag | CropTag |
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()
enhance(strength?): this;Defined in: fluent/image-chain.ts:120
Appends enhance; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
strength? | number |
Returns
this
Inherited from
ImageChain.enhance
exposure()
exposure(value): this;Defined in: fluent/image-chain.ts:96
Appends exposure; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
this
Inherited from
ImageChain.exposure
filter()
filter(name, amount?): this;Defined in: fluent/image-chain.ts:132
Appends filter; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
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()
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()
font(options): this;Defined in: fluent/image-chain.ts:223
Appends font; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
options | FontOptions |
Returns
this
Inherited from
ImageChain.font
format()
format(value): this;Defined in: fluent/image-chain.ts:170
Appends format; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | "auto" | "preserve" | "webp" | "jpeg" | "png" |
Returns
this
Inherited from
ImageChain.format
gamma()
gamma(value): this;Defined in: fluent/image-chain.ts:100
Appends gamma; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
this
Inherited from
ImageChain.gamma
getAllOps()
getAllOps(ref): CdnOperation[];Defined in: fluent/chain-base.ts:129
Every matching operation, in chain order. Mirrors CdnUrl.getAll.
Parameters
| Parameter | Type |
|---|---|
ref | OperationRef |
Returns
Example
chain.getAllOps('overlay') // → [{ name: 'overlay', … }, …]Inherited from
ImageChain.getAllOps
getOp()
getOp(ref): CdnOperation | null;Defined in: fluent/chain-base.ts:117
First matching operation, or null. Mirrors CdnUrl.get.
Parameters
| Parameter | Type |
|---|---|
ref | OperationRef |
Returns
CdnOperation | null
Example
myCdn.file(uuid).quality('smart').getOp('quality')
// → { name: 'quality', params: ['smart'] }Inherited from
ImageChain.getOp
grayscale()
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()
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
| Parameter | Type |
|---|---|
ref | OperationRef |
Returns
boolean
Example
myCdn.file(uuid).quality('smart').hasOp(quality) // → trueInherited from
ImageChain.hasOp
inline()
inline(enabled): this;Defined in: fluent/image-chain.ts:186
Appends inline; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
enabled | boolean |
Returns
this
Inherited from
ImageChain.inline
invert()
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()
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()
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()
mainColors(count?): this;Defined in: fluent/image-chain.ts:156
Appends mainColors; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
count? | number |
Returns
this
Inherited from
ImageChain.mainColors
maxIccSize()
maxIccSize(kb): this;Defined in: fluent/image-chain.ts:152
Appends maxIccSize; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
kb | number |
Returns
this
Inherited from
ImageChain.maxIccSize
mirror()
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()
op(name, ...params): this;Defined in: fluent/chain-base.ts:58
Appends an arbitrary operation without validation (escape hatch).
Parameters
| Parameter | Type |
|---|---|
name | string |
...params | string[] |
Returns
this
Inherited from
ImageChain.op
overlay()
overlay(source, options?): this;Defined in: fluent/image-chain.ts:196
Appends overlay; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
source | OverlaySource |
options? | OverlayOptions |
Returns
this
Inherited from
ImageChain.overlay
preview()
preview(width?, height?): this;Defined in: fluent/image-chain.ts:15
Appends preview; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
width? | number |
height? | number |
Returns
this
Inherited from
ImageChain.preview
progressive()
progressive(enabled): this;Defined in: fluent/image-chain.ts:178
Appends progressive; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
enabled | boolean |
Returns
this
Inherited from
ImageChain.progressive
proxy()
proxy(endpoint): this;Defined in: fluent/chains.ts:172
Rebases the chain onto another proxy endpoint (trailing slash tolerated).
Parameters
| Parameter | Type |
|---|---|
endpoint | string |
Returns
this
quality()
quality(value): this;Defined in: fluent/image-chain.ts:174
Appends quality; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | | "normal" | "lighter" | "smart" | "better" | "best" | "lightest" | "smart_retina" |
Returns
this
Inherited from
ImageChain.quality
rasterize()
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()
rect(
color,
size,
position
): this;Defined in: fluent/image-chain.ts:203
Appends rect; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
color | string |
size | readonly [SizeValue, SizeValue] |
position | RelativePoint |
Returns
this
Inherited from
ImageChain.rect
replaceAllOps()
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
| Parameter | Type |
|---|---|
operation | CdnOperation |
Returns
this
Example
chain.replaceAllOps({ name: 'overlay', params: [uuid] }).operationsInherited from
ImageChain.replaceAllOps
replaceOp()
replaceOp(operation): this;Defined in: fluent/chain-base.ts:142
Replaces the first matching operation in place, or appends it. Mirrors CdnUrl.replace.
Parameters
| Parameter | Type |
|---|---|
operation | CdnOperation |
Returns
this
Example
myCdn.file(uuid).resize({ width: 300 }).replaceOp(resize({ width: 500 })).hrefInherited from
ImageChain.replaceOp
resize()
resize(dims): this;Defined in: fluent/image-chain.ts:19
Appends resize; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
dims | { height?: number; width?: number; } |
dims.height? | number |
dims.width? | number |
Returns
this
Inherited from
ImageChain.resize
rotate()
rotate(angle): this;Defined in: fluent/image-chain.ts:78
Appends rotate; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
angle | number |
Returns
this
Inherited from
ImageChain.rotate
saturation()
saturation(value): this;Defined in: fluent/image-chain.ts:108
Appends saturation; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
this
Inherited from
ImageChain.saturation
scaleCrop()
scaleCrop(
width,
height,
options?
): this;Defined in: fluent/image-chain.ts:54
Appends scaleCrop; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
width | number |
height | number |
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()
setfill(color): this;Defined in: fluent/image-chain.ts:66
Appends setfill; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
color | string |
Returns
this
Inherited from
ImageChain.setfill
sharp()
sharp(strength?): this;Defined in: fluent/image-chain.ts:144
Appends sharp; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
strength? | number |
Returns
this
Inherited from
ImageChain.sharp
smartResize()
smartResize(width, height): this;Defined in: fluent/image-chain.ts:23
Appends smartResize; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
width | number |
height | number |
Returns
this
Inherited from
ImageChain.smartResize
srgb()
srgb(mode): this;Defined in: fluent/image-chain.ts:148
Appends srgb; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
mode | "fast" | "icc" | "keep_profile" |
Returns
this
Inherited from
ImageChain.srgb
stretch()
stretch(mode): this;Defined in: fluent/image-chain.ts:27
Appends stretch; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
mode | "fill" | "off" | "on" |
Returns
this
Inherited from
ImageChain.stretch
stripMeta()
stripMeta(mode): this;Defined in: fluent/image-chain.ts:182
Appends stripMeta; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
mode | "all" | "none" | "sensitive" |
Returns
this
Inherited from
ImageChain.stripMeta
text()
text(
size,
position,
value
): this;Defined in: fluent/image-chain.ts:211
Appends text; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
size | readonly [SizeValue, SizeValue] |
position | RelativePoint |
value | string |
Returns
this
Inherited from
ImageChain.text
textAlign()
textAlign(halign, valign): this;Defined in: fluent/image-chain.ts:219
Appends textAlign; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
halign | TextHAlign |
valign | TextVAlign |
Returns
this
Inherited from
ImageChain.textAlign
textBox()
textBox(
mode,
color?,
padding?,
borderRadius?
): this;Defined in: fluent/image-chain.ts:227
Appends textBox; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
mode | "fill" | "none" | "line" | "fit" |
color? | string |
padding? | number |
borderRadius? | number |
Returns
this
Inherited from
ImageChain.textBox
toString()
toString(): string;Defined in: fluent/chains.ts:182
Alias of the terminal getter for string coercion.
Returns
string
trim()
trim(tolerance?, padding?): this;Defined in: fluent/image-chain.ts:35
Appends trim; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
tolerance? | number |
padding? | string |
Returns
this
Inherited from
ImageChain.trim
updateOperations()
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
| Parameter | Type |
|---|---|
update | (current) => readonly CdnOperation[] |
Returns
this
Example
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()
vibrance(value): this;Defined in: fluent/image-chain.ts:112
Appends vibrance; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
this
Inherited from
ImageChain.vibrance
warmth()
warmth(value): this;Defined in: fluent/image-chain.ts:116
Appends warmth; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
this
Inherited from
ImageChain.warmth
withoutOp()
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
| Parameter | Type |
|---|---|
ref | OperationRef |
Returns
this
Inherited from
ImageChain.withoutOp
zoomObjects()
zoomObjects(zoom): this;Defined in: fluent/image-chain.ts:70
Appends zoomObjects; mirrors the creator in @uploadcare/cdn-url/ops.
Parameters
| Parameter | Type |
|---|---|
zoom | number |
Returns
this
Inherited from
ImageChain.zoomObjects