Output, Metadata & Delivery

This page documents all operations for controlling output format, quality, metadata handling, and delivery behavior.

Quality

q:%quality

Sets the output quality as a percentage. Applies to lossy formats like JPEG, WebP, and AVIF. When set to 0, the quality falls back to the server-side default.

Parameter
Type
Default
Allowed Values

quality

integer

0 (server default)

0–100

Examples:

# High quality
q:95

# Good balance of quality and file size
q:80

# Low quality for previews
q:50

Format Quality

fq:%format1:%quality1:%format2:%quality2:...

Sets different quality values per output format. This is useful when you serve images in multiple formats and want different quality levels for each.

Parameter
Type
Default
Allowed Values

formatN

string

jpeg, webp, avif, png, etc.

qualityN

integer

0–100

The format and quality values are provided as alternating pairs.

Example:


Max Bytes

Limits the output file size by automatically reducing quality until the image fits within the specified byte limit. Only works with lossy formats: JPEG, WebP, HEIC, and TIFF.

Parameter
Type
Default
Allowed Values

bytes

integer

0 (disabled)

Any positive integer (in bytes)

circle-exclamation

Examples:

Rewrite rule example — bandwidth-optimized thumbnails:

Regex: ^/small/(.*) Target: /_sx/img/_/rs:fit:200:200/mb:20480/plain/$1

This ensures thumbnails are never larger than 20 KB, regardless of the source image.


Format

Sets the output image format. If not specified, smoxy uses the source format (falling back to jpg).

Parameter
Type
Default
Allowed Values

extension

string

source format / jpg

jpg, jpeg, png, webp, avif, gif, ico, heic, bmp, tiff, pdf, svg

Examples:

Rewrite rule example — automatic WebP conversion:

Regex: ^/webp/(.*) Target: /_sx/img/_/f:webp/q:80/plain/$1

circle-exclamation

Strip Metadata

Controls whether EXIF, IPTC, XMP, and other metadata is stripped from the output image.

Parameter
Type
Default
Allowed Values

strip_metadata

boolean

server default

1, t, true to strip; 0, f, false to keep

Examples:


Preserves copyright-related metadata even when metadata stripping is enabled. Only has an effect when sm:1 (strip metadata) is active.

Parameter
Type
Default
Allowed Values

keep_copyright

boolean

server default

1, t, true to keep; 0, f, false to strip

Example:


Strip Color Profile

Controls whether the embedded ICC color profile is transformed to sRGB and removed. This helps reduce file size while maintaining consistent colors across devices.

Parameter
Type
Default
Allowed Values

strip_color_profile

boolean

server default

1, t, true to strip; 0, f, false to keep

Example:


Enforce Thumbnail

When enabled, forces the use of an embedded thumbnail instead of the main image. Currently supports thumbnails embedded in HEIC and AVIF formats only.

Parameter
Type
Default
Allowed Values

enforce_thumbnail

boolean

false

1, t, true to enable; 0, f, false to disable

Example:


Skip Processing

Skips all processing for images that match the listed formats. The image is returned as-is. This only works when the requested output format matches the source format.

Parameter
Type
Default
Allowed Values

extensionN

string(s)

empty

Any format extension(s): svg, gif, png, etc.

Examples:


Raw

Returns the raw, unprocessed source file directly. All processing operations and checks (type, resolution, file size) are skipped. The file is streamed directly, using less memory than normal processing.

Parameter
Type
Default
Allowed Values

raw

boolean

false

1, t, true to enable; 0, f, false to disable

circle-info

Tip: Unlike skp, the raw option works with any file type and doesn't check the source image at all. Use this when you need to serve files as-is through the image manipulation pipeline.

Example:


Cache Buster

Does not affect image processing. Its sole purpose is to change the URL so that CDN, proxy, and browser caches are bypassed. Use this when you've changed server-side settings (quality, presets, watermarks) that aren't reflected in the URL itself.

Parameter
Type
Default
Allowed Values

string

string

empty

Any arbitrary string

Examples:


Expires

Sets a Unix timestamp after which the URL becomes invalid. smoxy returns a 404 error for expired URLs. This is useful for time-limited image access.

Parameter
Type
Default
Allowed Values

timestamp

integer

empty (no expiry)

Unix timestamp

Example:


Filename

Sets the filename used in the Content-Disposition response header. When not specified, smoxy derives the filename from the source URL.

Parameter
Type
Default
Allowed Values

filename

string

source URL filename

Escaped string or URL-safe Base64-encoded string

encoded

boolean

false

1, t, true if the filename is Base64-encoded

Example:


Return Attachment

When enabled, sets the Content-Disposition header to attachment, which triggers a "Save As" dialog in the browser instead of displaying the image.

Parameter
Type
Default
Allowed Values

return_attachment

boolean

false

1, t, true to enable; 0, f, false to disable

Example:

Rewrite rule example — downloadable images:

Regex: ^/download/(.*) Target: /_sx/img/_/att:1/fn:download/plain/$1


Preset

Applies one or more named presets that are configured on the server side. Presets are collections of processing options that can be reused across multiple URLs. Operations set explicitly in the URL override the values from the preset.

Parameter
Type
Default
Allowed Values

preset_nameN

string(s)

empty

Any configured preset name(s)

Example:

Last updated

Was this helpful?