Skip to content

SYSTEM Cited by 1 source

Cloudflare Images

Cloudflare Images is an image optimization and transformation service built in Rust on Workers, running on every machine in Cloudflare's edge network. It provides transformation (resize, rotate, transcode, composite) and delivery optimization for images.

Architecture

The Images service uses systems/hyper to manage HTTP connections. The service:

  1. Reads input image data from the socket.
  2. Performs requested optimization operations (transcode, composite, resize).
  3. Encodes the result in-memory.
  4. Hands the full encoded response to hyper as a single block for transmission.

Images Binding

The Images binding provides a programmatic API for Workers to invoke image operations without returning the result as an HTTP response. It decouples image optimization from delivery, supports arbitrary operation ordering, and enables chaining:

const result = await env.IMAGES
  .input(image)
  .transform({ width: 800, rotate: 90 })
  .output({ format: "image/avif" });

Architecture Evolution (Dec 2025)

Originally, the binding communicated through FL (Cloudflare's internal intermediary for security/performance features) over network sockets. In December 2025, this was replaced with a local Unix socket connection directly between the Workers runtime and the Images service on the same machine. This:

Seen In

Last updated · 559 distilled / 1,651 read