URL Structure
imgFlux mirrors the URL layout of image cdn: every transformation is encoded inside the request path, and requests are authenticated via an HMAC signature. Source URLs can be provided either in plain text (with the plain/ prefix) or Base64-encoded format. This document details the anatomy of those URLs, explains how to sign them, and highlights development shortcuts.
Path anatomy
URL structure visualization
| Segment | Description |
|---|---|
<signature> | Base64 URL-safe, unpadded HMAC-SHA256 digest generated from the path. Use unsafe when unsigned URLs are permitted. |
<processing_options> | Slash-separated list of directives (e.g., 800x600q85trim). See Processing Options. |
plain/... | Indicates the source URL is provided in plain text (percent-encoded if needed) and may include @<extension> to declare the output format. |
<base64url-source> | The source URL encoded using URL-safe Base64 without padding (=). The output extension, if specified, is appended after a dot. |
Choosing between plain and Base64
Source URLs can be provided in two formats:
- Plain format (
plain/prefix): Use when the source URL contains only URL-safe characters and you want to specify the output format explicitly with@<extension> - Base64 format: Use when the source URL contains special characters, query parameters, or when you want to avoid potential encoding conflicts
Examples
Plain URL format with format conversion:
Base64-encoded URL format:
Note: aHR0cHM6Ly9leGFtcGxlLmNvbS9jYXRzL3NpYW1lc2UuanBn is the Base64URL encoding of https://example.com/cats/siamese.jpg
Plain URL with query parameters (requires Base64):
Note: aHR0cHM6Ly9leGFtcGxlLmNvbS9pbWFnZS5qcGc_dj0xMjM is the Base64URL encoding of https://example.com/image.jpg?v=123
Generate Base64 URL-safe strings without padding (replace + with -, / with _, and remove trailing =).
Next steps
- Explore available transformations in Processing Options.
- Review the request lifecycle in Request Lifecycle.
- If your application generates many URLs, encapsulate signing logic into a shared helper library to avoid drift.