Image API

Configure the image. Copy the URL.

Refract transforms, optimizes, and delivers images from your own origin, driven entirely by URL parameters. No re-upload, no build step.

https://demo.refract.dev/hero.jpg?w=1200&fm=auto&q=80

What Refract does

Three moves on every image.

Point Refract at an existing image origin. Originals are fetched on demand and cached at the edge, never stored permanently.

Smooth faceted studio object on a pale seamless background

Transform

Ten chainable URL parameters resize, crop, and rotate on the fly. Smart crop keeps subjects in frame.

Open
Matte object with long tonal gradients on a pale background

Optimize

fm=auto negotiates AVIF, WebP, then JPEG from the request Accept header. Average 62% payload reduction versus source JPEG.

Open
Overhead view of a curved form entering the frame from a corner

Deliver

41 edge locations. Cached response p50 21 ms, 98.6% cache hit ratio; cold transform p50 89 ms, p99 340 ms.

Open

Live transform

Set the parameters. Watch the plate.

Seven parameters a browser can genuinely apply mutate the render in the same frame and rewrite the URL beneath it. fm, q, and dpr are negotiated server-side and ride the URL, tagged.

w — width, px

1200

h — height, px

AUTO

fit — resize mode

crop — strategy

rot — rotation

blur — 0 to 100

bg — background fill

Source image before any transform

BEFORE — source

Source image after the current transform

AFTER — transformed

Source cropped with smart strategy

?w=600&fit=cover&crop=smart

Source contained with a grey background fill

?w=600&fit=contain&bg=eaeaea

Source rotated 90 degrees

?w=600&rot=90

Source with a gaussian blur applied

?w=600&blur=40

Measured

The numbers that ship.

62%

Average payload cut

21 ms

Median cached response

98.6%

Cache hit ratio

99.95%

Uptime SLA (Scale)

Build your first transform in a single URL.

Start building