Skip to content

Effects & Adjustments

This page documents all operations for applying visual effects, transformations, and spacing to images.

Blur

bl:%sigma

Applies a Gaussian blur to the image. Higher sigma values produce a stronger blur effect.

ParameterTypeDefaultAllowed Values
sigmafloatdisabledAny positive float

Examples:

# Light blur
bl:3

# Strong blur (good for background overlays)
bl:15

# Subtle blur
bl:1.5

Rewrite rule example -- blurred hero backgrounds:

Regex: ^/hero-bg/(.*) Target: /_sx/img/_/rs:fill:1920:600/bl:15/q:70/plain/$1

A request to /hero-bg/media/banner.jpg delivers a 1920x600 blurred version of the image, perfect for placing text over.


Sharpen

sh:%sigma

Applies a sharpening filter to the image. Use this to enhance image detail, especially after resizing.

ParameterTypeDefaultAllowed Values
sigmafloatdisabledAny positive float

As an approximate guideline:

SigmaUse case
0.5Screen display (~4 pixels/mm)
1.0Print at 12 pixels/mm
1.5Print at 300 DPI (16 pixels/mm)

Examples:

# Light sharpening for web display
sh:0.5

# Moderate sharpening
sh:1.0

Pixelate

pix:%size

Applies a pixelation filter to the image. The size parameter defines the size of each pixel block in the output.

ParameterTypeDefaultAllowed Values
sizeintegerdisabledAny positive integer

Examples:

# Moderate pixelation
pix:8

# Heavy pixelation (strong anonymization)
pix:20

Rewrite rule example -- pixelated preview images:

Regex: ^/preview/(.*) Target: /_sx/img/_/rs:fit:400:400/pix:10/q:60/plain/$1


Rotate

rot:%angle

Rotates the image clockwise by the specified angle. Only 90-degree increments are supported. The EXIF orientation is applied before rotation unless auto-rotation is disabled.

ParameterTypeDefaultAllowed Values
angleinteger00, 90, 180, 270 (multiples of 90)

Examples:

# Rotate 90 degrees clockwise
rot:90

# Rotate 180 degrees (flip upside down)
rot:180

# Rotate 270 degrees clockwise (= 90 degrees counter-clockwise)
rot:270

Auto Rotate

ar:%auto_rotate

Controls automatic rotation based on EXIF Orientation metadata. When enabled, smoxy reads the orientation tag from the image metadata and rotates the image accordingly. The orientation tag is always removed from the output regardless of this setting.

ParameterTypeDefaultAllowed Values
auto_rotatebooleantrue1, t, true to enable; 0, f, false to disable

Example:

# Disable auto-rotation
ar:false

Background

bg:%R:%G:%B
bg:%hex_color

Sets the background color used when converting images with transparency (e.g., PNG to JPEG), for padding, and for extend operations.

ParameterTypeDefaultAllowed Values
Rinteger--0-255
Ginteger--0-255
Binteger--0-255
hex_colorstring--Any valid hex color (e.g., ff0000, ffffff)

With no arguments, background manipulation is disabled.

Examples:

# White background (RGB)
bg:255:255:255

# White background (hex)
bg:ffffff

# Red background
bg:ff0000

# Light gray background
bg:f5f5f5

Rewrite rule example -- PNG to JPEG with white background:

Regex: ^/jpg/(.*\.png) Target: /_sx/img/_/bg:ffffff/f:jpg/q:85/plain/$1


Padding

pd:%top:%right:%bottom:%left

Adds padding around the image, filled with the background color. Uses CSS-style shorthand. Padding is applied after all other transformations (except watermarking) and increases the final image dimensions.

ParameterTypeDefaultAllowed Values
topinteger0Any non-negative integer (pixels)
rightinteger0Any non-negative integer (pixels)
bottominteger0Any non-negative integer (pixels)
leftinteger0Any non-negative integer (pixels)

Shorthand behavior

FormatMeaning
pd:1010px on all sides
pd:10:2010px top/bottom, 20px left/right
pd:10:20:3010px top, 20px left/right, 30px bottom
pd:10:20:30:4010px top, 20px right, 30px bottom, 40px left

INFO

Note: Padding enlarges the final image beyond the requested dimensions. If you resize to 100x200 and apply pd:10, the result will be 120x220 pixels.

INFO

Note: Padding values are affected by the DPR setting and will be scaled accordingly.

Examples:

# 10px on all sides with white background
bg:ffffff/pd:10

# 20px top/bottom, 40px left/right
pd:20:40

# Asymmetric padding
pd:10:20:30:40

Rewrite rule example -- product images with consistent padding:

Regex: ^/product/(\d+)x(\d+)/(.*) Target: /_sx/img/_/rs:fit:$1:$2/bg:ffffff/pd:10/q:85/plain/$3

This ensures all product images have the same dimensions with a white border, which is useful for grid layouts.