Image API

Take the image apart.

Refract runs your images through resize, frame, and encode on the fly, then serves them from the edge — the whole pipeline addressed by URL parameters. This is the section drawing: one photograph, cut through the stages it passes on the way to the browser.

Origin A clear glass prism on a graphite surface under hard cool directional light, splitting a faint spectrum, set off-centre to the left.
Resize
Frame
Encode
Resize
w= 1200
Frame
crop= smart
Encode Server-side
fm= auto

Parameter console

w
1200
h
auto
rot
blur
0
fit
crop
smart
bg
fm
Server-side
auto
q
Server-side
80
dpr
Server-side
1
https://demo.refract.dev/hero.jpg?w=1200&fm=auto&q=80

Three capabilities

Transform, optimize, deliver.

A stack of thin brushed-aluminium plates fanned slightly apart on a graphite surface under hard cool side light.

Transform

Resize, crop, rotate, and blur on the fly. Ten chainable URL parameters compose in a single request, and smart crop holds the subject in frame while the box changes around it.

10 chainable parameters

A fine perforated steel mesh filling the frame under hard cool raking light, sharp macro detail in cold near-black tones.

Optimize

fm=auto reads the request's Accept header and negotiates AVIF, then WebP, then JPEG — no format guessing, no double storage. Payload drops 62% against source JPEG on average.

AVIF · WebP · JPEG, from one Accept header

A long row of identical polished nickel cylinders receding into darkness, hard cool light falling across the nearest and dropping off sharply.

Deliver

Transformed variants cache at 41 edge locations. Cached responses return at a p50 of 21 ms with a 98.6% hit ratio; a cold transform clears in a p50 of 89 ms.

41 edge locations · p50 21 ms cached

Live transform

One photograph, two readings.

The right plate is the left plate under object-fit, object-position, transform, filter, and a background colour — the same seven browser-honest parameters the console drives. No second asset, no pre-baked “optimized” copy. Move a control and both plates repaint in the same frame.

Origin The origin photograph, untransformed.
Encode The same photograph after resize, frame, and encode.

Applied: w=1200, fit=cover, crop=smart, q=80, fm=auto.

62 %

Average payload reduction

21 ms

Median cached response

98.6 %

Cache hit ratio

99.95 %

Uptime SLA (Scale)

Read the stages off your own images.

Point Refract at an existing origin, request your first transform, and automate the rest with the SDK. No re-upload, no storage of your originals.

Start building