Presets (Pro)
Presets are a Pro feature. Upgrade to Pro to use them.
?p:thumbnail or ?p:hero.
Why Use Presets?
- Consistency: Same transformations across your application
- Simplicity: Short, readable URLs
- Maintainability: Update transformations in one place
- Performance: Preset lookup is cached at the edge
Available Parameters
Presets support all image transformation parameters. Here’s the complete reference:Size & Layout
| Parameter | Type | Description | Values | Default |
|---|---|---|---|---|
w | integer | Width in pixels | 1-10000 | Auto |
h | integer | Height in pixels | 1-10000 | Auto |
fit | string | How the image fits within dimensions | See below | cover |
aspect | string | Aspect ratio constraint | See below | original |
| Value | Description |
|---|---|
cover | Fill the dimensions, cropping excess (default) |
contain | Fit within dimensions, preserving aspect ratio (may have letterboxing) |
fill | Stretch to fill dimensions exactly (may distort) |
scale-down | Like contain, but never upscale smaller images |
| Value | Description |
|---|---|
original | Keep original aspect ratio (default) |
1:1 | Square |
4:3 | Standard photo |
16:9 | Widescreen |
3:2 | Classic 35mm |
21:9 | Ultra-wide |
Quality & Display
| Parameter | Type | Description | Values | Default |
|---|---|---|---|---|
q | integer | Compression quality | 1-100 | 80 |
dpr | number | Device pixel ratio (Retina) | 1, 1.5, 2, 3 | 1 |
crop | string | Crop position when using fit=cover | See below | center |
grayscale | boolean | Convert to grayscale | true, false | false |
| Value | Description |
|---|---|
center | Center of the image (default) |
top | Top edge |
bottom | Bottom edge |
left | Left edge |
right | Right edge |
top-left | Top-left corner |
top-right | Top-right corner |
bottom-left | Bottom-left corner |
bottom-right | Bottom-right corner |
attention | Auto-detect important area (faces, objects) |
entropy | Area with highest visual complexity |
Effects & Transform
| Parameter | Type | Description | Values | Default |
|---|---|---|---|---|
blur | number | Gaussian blur radius | 0-100 | 0 (none) |
sharpen | number | Sharpen intensity | 0-100 | 0 (none) |
rotate | integer | Rotation angle | 0, 90, 180, 270, auto | 0 (none) |
flip | string | Flip/mirror the image | h, v, both | none |
| Value | Description |
|---|---|
0 | No rotation (default) |
90 | Rotate 90° clockwise |
180 | Rotate 180° |
270 | Rotate 270° clockwise (90° counter-clockwise) |
auto | Auto-rotate based on EXIF orientation |
| Value | Description |
|---|---|
h | Flip horizontally (mirror) |
v | Flip vertically |
both | Flip both horizontally and vertically |
Example: All Parameters
Common Preset Configurations
Retina-ready thumbnail
Retina-ready thumbnail
Grayscale portrait
Grayscale portrait
Blurred background
Blurred background
Social media (16:9)
Social media (16:9)
Creating a Preset
Using a Preset
Apply a preset with thep: parameter. The syntax is p:preset_name (note the colon):
The preset parameter uses
p:name syntax (with a colon), not p=name. This is to clearly distinguish presets from other parameters.Common Preset Examples
Thumbnail
Hero Image
Product Image
Avatar
OG Image (Social Media)
Overriding Preset Parameters
You can override specific parameters:Listing Presets
Updating a Preset
Deleting a Preset
Preset Naming Rules
- Alphanumeric characters, hyphens, and underscores
- 1-50 characters
- Case-sensitive
- Must be unique per user
thumbnailhero-imageproduct_largeog_1200x630
my preset(spaces)@avatar(special characters)- “ (empty)
Limits
| Plan | Max Presets |
|---|---|
| Pro | 50 |
Best Practices
Use descriptive names
Use descriptive names
Name presets by their purpose, not their parameters:
- Good:
hero,thumbnail,product-card - Bad:
200x200,small,img1
Document your presets
Document your presets
Use the
description field to explain when to use each preset.Start with common sizes
Start with common sizes
Create presets for your most frequently used transformations first.
Test before deploying
Test before deploying
Verify preset output before using in production: