Core Concepts

Understand how imgfast works under the hood to optimize your images.

psychology

How It Works

imgfast is a global CDN and image optimization service. When you request an image through our CDN, we automatically optimize it based on the viewer's browser and device.

1

Request

User requests an image from cdn.imgfast.io with transformation parameters

2

Edge Check

Our edge server checks if the transformed image exists in cache

3

Transform

If not cached, we fetch the original, apply transformations, and cache the result

4

Deliver

Optimized image is delivered from the nearest edge location

link

URL Structure

https://cdn.imgfast.io/{public_key}/{image_path}?{parameters}

# Components:
# - cdn.imgfast.io    : Our CDN domain
# - {public_key}      : Your account's public key
# - {image_path}      : Path to your uploaded image
# - {parameters}      : Transformation parameters

Remote URL Proxy

You can also transform images from any URL without uploading:

https://cdn.imgfast.io/{public_key}/url/{remote_url}?{parameters}

# Example:
https://cdn.imgfast.io/pk_abc123/url/https://example.com/photo.jpg?w=800&f=webp
bolt

Edge Processing

All image transformations happen at the edge, close to your users. This means:

speed

Ultra-Low Latency

Images are processed at the nearest edge location (300+ POPs worldwide)

public

Global Distribution

Transformed images are cached globally for instant delivery

memory

Zero Origin Load

Your origin server only serves original images once

auto_awesome

Smart Optimization

Automatic format selection based on browser capabilities

cached

Caching Strategy

We use a multi-tier caching system for optimal performance:

L1

Edge Cache (1 year TTL)

Transformed images are cached with immutable cache headers

L2

Origin Cache

Original images cached at origin for fast transformations

KV

Config Cache (5 min TTL)

Customer configuration cached for fast validation

shield

Security Model

imgfast provides multiple security layers to protect your images:

API Key Authentication

Public keys identify your account. Secret keys authenticate API requests.

Signed URLs

HMAC-signed URLs with expiration to prevent hotlinking and URL tampering.

Domain Restrictions

Restrict which domains can use the Remote URL Proxy feature.

Referrer Validation

Block requests from unauthorized referrers to prevent image theft.