Skip to content

API Reference

The Image API enables real-time image manipulation by appending query string parameters to image URLs.

TIP

  • See API Response Errors for error meanings.
  • All parameters support Base64 encoding. Append "64" to the parameter name and base64 encode the value.

auto_fix

Automatically adjust the brightness and contrast of an image.

http
GET /image.jpg?auto_fix=true HTTP/1.1
See Example

auto_level

Automatically adjust the white balance level of an image.

http
GET /image.jpg?auto_level=true HTTP/1.1
See Example

autorotate

Disable image autorotation based on EXIF orientation tag. Default value is true.

http
GET /image.jpg?autorotate=false HTTP/1.1

blur

Apply a blur effect to an image (0 to 100).

http
GET /image.jpg?blur=100 HTTP/1.1
See Example

brightness

Adjust the brightness of an image (-1.0 to 1.0).

http
GET /image.jpg?brightness=0.5 HTTP/1.1
See Example

bucket

Override the awsAuthorization S3 bucket name. Imagizer uses the configured keys or IAM role for authorization.

http
GET /image.png?bucket=my.s3.bucket HTTP/1.1

TIP

Restrict with bucketsAllowed or disable with allowDynamicOrigin.

TIP

Specify the AWS region with the region parameter. Without it, Imagizer looks up the bucket's region automatically.

cache_processed

Apply parameters before caching the origin image. Subsequent requests for the original return the preprocessed version.

TIP

Works with POST Requests only.

Example: Perform redeye correction and auto_fix then cache the preprocessed image. The image will be cached at /image.jpg.

http
POST http://IMAGIZER_HOSTNAME/image.jpg HTTP/1.1
Content-Type: multipart/form-data;

file=@image.jpg
redeye=true
auto_fix=true
cache_processed=true

cache_queries

Pass an array of query strings to be preprocessed and cached.

TIP

Works with Post Requests and Async Requests only.

WARNING

Make sure to URL encode the cache_queries value.

Example: Preprocess and cache an image with a width of 200px, a width of 400px, and a height of 500px.
The following URLs will be processed and cached /image.jpg, /image.jpg?width=200, /image.jpg?width=400, and /image.jpg?height=500.

http
POST http://IMAGIZER_HOSTNAME/image.jpg HTTP/1.1
Content-Type: multipart/form-data;

file=@image.jpg
cache_queries[]=width%3D200
cache_queries[]=width%3D400
cache_queries[]=height%3D500

colorize

Apply a color tint to an image. Accepts RGB values, hex codes, or color names.

http
GET /image.jpg?colorize=rgb(255,0,0) HTTP/1.1
See Example

TIP

Custom colors may be defined using the presetColors configuration.

colorize_intensity

Adjust the intensity of colorization (1–100). Default: 1.

http
GET /image.jpg?colorize=green&colorize_intensity=50 HTTP/1.1
See Example

contrast

Adjust the contrast of an image (-1.0 to 1.0).

http
GET /image.jpg?contrast=1 HTTP/1.1
See Example

crop

Crop the image. There are eight different crop modes. See below for details on each.

TIP

Both the width and height parameters are required.

fit

Crop excess image data outside the given dimensions after scaling. The crop centers on the image. Output matches the specified dimensions exactly.

http
GET /image.jpg?width=400&height=300&crop=fit HTTP/1.1
See Example

top

Crop excess image data from the top down after scaling. Output matches the specified dimensions exactly.

http
GET /image.jpg?width=400&height=300&crop=top HTTP/1.1
See Example

bottom

Crop excess image data from the bottom up after scaling. Output matches the specified dimensions exactly.

http
GET /image.jpg?width=400&height=300&crop=bottom HTTP/1.1
See Example

pad

Scale to the given dimensions and fill extra space with pad_color. Default: white.

http
GET /image.jpg?width=400&height=300&crop=pad HTTP/1.1
See Example

zoom

Zoom in during rotation and crop out whitespace created by the rotation.

TIP

Requires the rotate parameter.

http
GET /image.jpg?rotate=30&crop=zoom HTTP/1.1
See Example

stretch

Stretch an image to the given dimensions, ignoring the original aspect ratio.

http
GET /image.jpg?width=250&height=250&crop=stretch HTTP/1.1
See Example

face

Crop the image around any detected faces.

http
GET /image.jpg?crop=face HTTP/1.1
See Example

entropy

Detect the area of interest and crop out insignificant regions.

http
GET /image.jpg?crop=entropy HTTP/1.1
See Example

custom

Return a cropped region specified by x, y, width, and height (comma-separated).

http
GET /image.jpg?crop=160,435,300,300 HTTP/1.1

TIP

Use center in place of the x-coordinate or y-coordinate values to automatically detect the center of the image.

WARNING

If the width parameter is set, it is processed first. Therefore, when generating custom crop values, ensure they are based on the scaled image.

See Example

Percentage Crop New!

Percentages can replace any of the four values. The resulting crop will be determined based on percentages of the scaled image.

Crop 25% from the left, 25% from the top, 50% width, and 50% height.

http
GET /image.jpg?crop=25%,25%,50%,50% HTTP/1.1
See Example

TIP

Percentage crop values support up to nine decimal places.

dpr

Set the device pixel ratio (DPR)—the ratio between physical and logical pixels. For example, iPhone 7 has a DPR of 2.

http
GET /image.jpg?dpr=2&width=300 HTTP/1.1

TIP

The width and/or height parameters are required.

See Example

fill_flash

Adjust the fill flash of an image (0 to 1).

http
GET /image.jpg?fill_flash=1 HTTP/1.1
See Example

filter

Apply various effects to the image. Imagizer offers 20 different filters.

http
GET /image.jpg?filter=2 HTTP/1.1
See Example

flatten

Remove the alpha channel (transparency) from the image. This reduces file size and improves delivery times.

http
GET /image-trans.png?flatten=1 HTTP/1.1

TIP

Use the pad_color parameter to specify the background color.

See Example

flip

Flip the image horizontally. For vertical flip, combine with rotate=180.

http
GET /image.jpg?flip=true HTTP/1.1
See Example

format

Set the output format of the image. Supported output formats are JPEG, PNG, WEBP, and MP4.

http
GET /image.png?format=webp HTTP/1.1

TIP

Not all browsers support WEBP. Please see the supported browser list here.

WARNING

The mp4 format will be ignored unless conversion is performed on a GIF image.

See Example

format=auto

Automatically format the image for optimal delivery. Outputs WEBP when supported, otherwise JPEG (or PNG for transparent images).

http
GET /image.png?format=auto HTTP/1.1
See Example

gamma

Adjust the gamma of an image (-1 to 1).

http
GET /image.jpg?gamma=1 HTTP/1.1
See Example

height

Scale the image to the given height. Width is calculated automatically to preserve aspect ratio.

http
GET /image.jpg?height=200 HTTP/1.1

TIP

Alias: h (e.g., h=200).

See Example

TIP

When both width and height are supplied, the image scales to fit within both dimensions while preserving aspect ratio. Use crop for exact dimensions.

highlight

Adjust the brightness of the image highlights (-1 to 1).

http
GET /image.jpg?highlights=1 HTTP/1.1
See Example

host_header

Override the Host header on the origin request to the image storage.

http
GET /img.jpg?host_header=images.example.com&origin=example.com HTTP/1.1

TIP

Works well with the origin parameter.

interlace

Set the output image as an interlaced (progressive) image.

http
GET /image.png?interlace=true HTTP/1.1

TIP

Supports PNG and JPEG only.

See Example

layers

Combine multiple images and text layers into one image. The layers parameter accepts a JSON array of layer objects.

http
GET /image.jpg?layers=<JSON> HTTP/1.1

TIP

When passing a JSON string in a URL, always URL-encode or Base64-encode it first. For more complex JSON, we recommend Base64 encoding and using the layers64= parameter instead of layers=.

Make sure the full URL stays under 8 KB in length.

Image layer object

AttributeDescription
urlA relative, absolute or data URL to the layer image.
posThe position of the layer. Possible values are left, right, top and bottom (default center).
scalePercentage to scale the layer to the source image. (default 100).
upscaleWhen true allow upscaling of the layer image. (default: true).
xThe X coordinate of the layer.
yThe Y coordinate of the layer.
alphaPercentage of the transparency of the layer. (default 100).
offsetThe number of pixels to offset the layer from the given position (default 0).
requiredWhen true return an error when any individual layer fetch fails.

The JSON can look something like this:

json
[
  {
    "url": "/image-trans.png",
    "pos": "top|left",
    "scale": 50
  },
  {
    "url": "/image-trans.png",
    "pos": "top|right",
    "scale": 30
  },
  {
    "url": "/image-transparent.png",
    "pos": "bottom|left",
    "scale": 20
  },
  {
    "url": "/image-transparent.png",
    "pos": "bottom|right",
    "scale": 60
  }
]
See Example
Embedding Images with the Data URI Scheme

You can embed small images directly inside your JSON by using the Data URI scheme. This lets you avoid hosting a separate file and is ideal for small payloads.

TIP

This feature must be enabled via the allowDataUrls configuration option.

json
[
  {
    "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsSAAALEgHS3X78AAABvUlEQVQokWNggABGEMHKKi/Kz2/rKiBg4cXPZ+HIwS4hAZFlBMszsDMwitpJRumm66yUSJbYKBMt0ydlKxXJysfKBzUFpI6RCcTm5lb11tFpemxq2vXDx2fZT2Ozef/lVTIvcXCKC3GzMrMIM7EImZlLtkc0uf0P3hb20X+h3w/9fv3vwetD/stlys2HGsgEtJyJGcQGuirXzq79v4pK+h893bL/Zko+f8J13X5PiUjdNS0wYPesqMgbW4uLviwMDPnrkaTxxnG6+0vtEq1HCj0K/8UixGbCDYR5l4mJk4OPz71SQiJjo5FR3o4YNe0XaRpK/1oN9R4fKSt7u7m66sWMxISbS+MSPvba2v7XjJa/pZancVDAUqCBkZVRBDnoUAAwuJhA4jpCwh7BUgo/YyTkH87T0n66MTXjxfbC8udnSkp+9lrbXODnYFVkYAcHGiNWg0BGATEzExMjOAiMTfm0lncafZkRpfu70UXtcWeA+bvJ2eb/vQyE06EWM0LdxAyNDOyAESopJsomHhErnp9bID8lJVlxU16h2r3UXJn5AiLsLFB1TDhcRhgwMzGw8XAzCjAzg13PyIjHIAAzM3jNcUR16gAAAABJRU5ErkJggg==",
    "pos": "center",
    "upscale": false
  }
]
See Example

Text layer object

In addition to Image Layer attributes, the Text Layer uses the following attributes:

AttributeDescription
colorThe color of the text.
fontThe font family, style and size in one declaration. Font size will increase the text quality. Use scale to change the size.
textThe text string to display.

Generates text in italic.

json
{
  "text": "Some text",
  "font": "italic"
}

Generates text in font size 20.

json
{
  "text": "Some text",
  "font": "20"
}

Generates text in Arial Bold.

json
{
  "text": "Some text",
  "font": "Arial Bold"
}

Combine all of the elements together.

json
{
  "text": "Some text",
  "font": "Arial italic 20"
}

The JSON string can look something like this:

json
[
  {
    "font": "arial bold 20",
    "text": "red",
    "color": "red",
    "pos": "top",
    "scale": 30
  },
  {
    "font": "Times 20",
    "text": "green",
    "color": "green",
    "pos": "center",
    "scale": 30
  },
  {
    "font": "italic 20",
    "text": "blue",
    "color": "blue",
    "pos": "bottom",
    "scale": 30
  }
]
Fonts
See Font List
font familyStyles
Andale MonoRegular, normal
Arial BlackRegular, Standard
ArialRegular, Bold, Italic
Bitstream CharterRegular, Bold, Italic, Bold Italic
Century Schoolbook LBold, Italic, Bold Italic, Roman
cmex10LyX
cmmi10LyX
cmr10LyX
cmsy10LyX
Comic Sans MSRegular, normal, Bold
Costar BrownRegular, Light, Italic, Bold, Bold Italic, Light Italic
Courier 10 PitchRegular, Bold, Italic, Bold Italic
Courier NewRegular, Bold, Italic, Bold Italic
CursorRegular
DejaVu SansBold, Oblique, Bold Oblique, Book, Condensed, Condensed Bold, ExtraLight
DingbatsRegular
esint10LyX
eufm10LyX
GeorgiaRegular, Bold, Italic, Bold Italic
ImpactRegular, Standard
Liberation MonoRegular, Bold, Italic, Bold Italic
Liberation SansRegular, Bold, Italic, Bold Italic
Liberation Sans NarrowRegular, Bold, Italic, Bold Italic
Liberation SerifRegular, Bold, Italic, Bold Italic
msam10LyX
msbm10LyX
Nimbus Mono LRegular, Regular Oblique, Bold, Bold Oblique
Nimbus Roman No9 LRegular, Regular Italic, Medium, Medium Italic
Nimbus Sans LRegular, Bold, Italic, Bold Italic, Regular Condensed, Bold Condensed, Bold Condensed Italic
Open SansRegular, Bold, Italic, Bold Italic, Semibold, Extrabold, Light
Playfair DisplayRegular, Black, Medium, Bold, Italic, SemiBold, Bold Italic, ExtraBold Italic, SemiBold Italic, Medium Italic, Black Italic, ExtraBold
RedHat DisplayRegular, Black, Medium, Bold, Italic, Light, SemiBold, ExtraBold, Black Italic, SemiBold, SemiBold Italic, Light Italic, ExtraBold Italic, BoldItalic
rsfs10LyX
SpartanRegular, Light, Medium, Thin, Black, Bold, SemiBold, ExtraBold, ExtraLight
Standard Symbols LRegular
stmary10LyX
TahomaRegular
Times New RomanRegular, Bold, Italic, Bold Italic
Trebuchet MSRegular, Bold, Italic, Bold Italic, Standard
URW Bookman LLight, Light Italic, Demi Bold, Demi Bold Italic
URW Chancery LMedium Italic
URW Gothic LBook, Book Oblique, Demi, Demi Oblique
URW Palladio LBold, Bold Italic, Italic, Roman
UtopiaRegular, Bold, Italic, Bold Italic
VerdanaRegular, Bold, Italic, Bold Italic
wasy10LyX
WebdingsRegular, normal
See Example

mark

Provides the location of the watermark image. May be a relative or absolute path.

http
GET /image.jpg?mark=<URL> HTTP/1.1
See Example

Watermarking can be globally set by using the ImageParamsAllowed config.

mark_alpha

Adjust the watermark alpha (0-100 where 0 means fully transparent and 100 is fully opaque).

http
GET /image.jpg?mark=<URL>&mark_alpha=true HTTP/1.1

TIP

Requires the mark parameter.

See Example

mark_scale

Scale the watermark to a percentage of the smallest dimension.

http
GET /image.jpg?mark=<URL>&mark_scale=60 HTTP/1.1

TIP

Requires the mark parameter.

See Example

mark_pos

Position the watermark within the source image. Possible values are top, right, bottom, and left; the default position is center.

http
GET /image.jpg?mark=<URL>&mark_pos=top HTTP/1.1

TIP

Requires the mark parameter.

See Example

mark_offset

Offset the watermark position by a given percentage.

http
GET /image.jpg?mark=/image-trans.png&mark_pos=top&mark_offset=40 HTTP/1.1

TIP

Requires the mark and mark_pos parameters.

See Example

mark_upscale

When true upscale the watermark image to better cover the image. The default value is false.

http
GET /image.jpg?mark=<URL>&mark_upscale=true HTTP/1.1

TIP

Requires the mark and mark_scale parameters.

See Example

mark_required

When true, return an error if the watermark image request fails, rather than returning an image missing the watermark.

http
GET /image.jpg?mark=<URL>&mark_required=true HTTP/1.1

meta

Return image metadata in JSON format, including EXIF data and dominant color.

http
GET /image.png?meta=true HTTP/1.1
See Example

/image.jpg?meta=true

json
{
  "fileSize": 4428575,
  "width": 4032,
  "height": 3024,
  "fileType": "jpeg",
  "mimeType": "image/jpeg",
  "hasAlpha": false,
  "colorSpace": "srgb",
  "exif": {
    "ApertureValue": "2159/1273",
    "BrightnessValue": "3497/314",
    "DateTime": "2017:04:02 16:08:21",
    "DateTimeDigitized": "2017:04:02 16:08:21",
    "DateTimeOriginal": "2017:04:02 16:08:21",
    "ExifImageLength": 3024,
    "ExifImageWidth": 4032,
    "ExifOffset": 180,
    "ExifVersion": "48, 50, 50, 49",
    "ExposureBiasValue": "0/1",
    "ExposureMode": 0,
    "ExposureProgram": 2,
    "ExposureTime": "1/3690",
    "Flash": 24,
    "FNumber": "9/5",
    "FocalLength": "399/100",
    "FocalLengthIn35mmFilm": 28,
    "ISOSpeedRatings": 20,
    "Make": "Apple",
    "MeteringMode": 5,
    "Model": "iPhone 7",
    "Orientation": 1,
    "ResolutionUnit": 2,
    "SensingMethod": 2,
    "ShutterSpeedValue": "29588/2497",
    "Software": 10.3,
    "SubjectArea": "2015, 1511, 2217, 1330"
  },
  "faces": [],
  "server": {
    "host": "ip-10-0-1-96",
    "ip": "10.0.1.96"
  },
  "dominateColor": "#4C719F"
}

face

Return facial coordinates along with meta data.

http
GET /image.png?meta=true&face=true HTTP/1.1

TIP

Requires the meta parameter.

See Example
json
{
  "fileSize": 215707,
  "width": 1710,
  "height": 1140,
  "fileType": "jpeg",
  "mimeType": "image/jpeg",
  "hasAlpha": false,
  "colorSpace": "srgb",
  "exif": {
    "ColorSpace": 65535,
    "ExifOffset": 90,
    "ExifVersion": "48, 50, 50, 49",
    "Orientation": 1,
    "Software": "Adobe Photoshop CS6 (Macintosh)"
  },
  "faces": [
    {
      "xPos": 926,
      "yPos": 524,
      "width": 137,
      "height": 137
    },
    {
      "xPos": 1012,
      "yPos": 311,
      "width": 140,
      "height": 140
    },
    {
      "xPos": 516,
      "yPos": 228,
      "width": 200,
      "height": 200
    },
    {
      "xPos": 1163,
      "yPos": 148,
      "width": 157,
      "height": 157
    },
    {
      "xPos": 125,
      "yPos": 362,
      "width": 285,
      "height": 285
    }
  ],
  "server": {
    "host": "ip-10-0-1-81",
    "ip": "10.0.1.81"
  },
  "jpeg": {
    "colorspace": 2,
    "sampling-factor": "2x2,1x1,1x1"
  }
}

include_image_data

Include the image data, embedded in the metadata JSON object, as a base64 string.

http
GET /image.jpg?meta=true&include_image_data=true HTTP/1.1

TIP

Requires the meta parameter.

See Example
json
{
  "fileSize": 4428575,
  "width": 4032,
  "height": 3024,
  "fileType": "jpeg",
  "mimeType": "image/jpeg",
  "hasAlpha": false,
  "colorSpace": "srgb",
  "exif": {},
  "faces": [],
  "imageData": "...",
  "server": {
    "host": "ip-10-0-1-96",
    "ip": "10.0.1.96"
  }
}

origin

Override the image storage backend server.

http
GET /image.png?origin=http://images.example.com HTTP/1.1

TIP

The origin parameter can be restricted by setting the Hostname Allowed config or disabled completely using the Allow Dynamic Origin config.

pad

Add padding around an image with a given pad_color as a hex string. The default color is white.

http
GET /image.jpg?pad=30 HTTP/1.1

TIP

See the crop parameter to automatically pad images.

See Example

pad_color

Set the color of the padding.

Some of the predefined values are: white, black, red, green, blue, yellow, magenta, and cyan. pad_color will also accept a hex string (e.g. fff, ffffff).

http
GET /image.jpg?pad=30&pad_color=555 HTTP/1.1

TIP

Requires the pad, crop, rotate, or flatten parameters.

TIP

Use pad_color=0000 to pass transparent.

See Example

quality

Set the image quality. A lower setting will reduce the file size. Possible value ranges from 1 to 100. The quality of the initial image will be applied if the quality parameter is not explicitly set. If the initial image quality cannot be detected, a quality of 90 will be applied.

http
GET /image.jpg?quality=80 HTTP/1.1
See Example

auto New!

The value of auto will automatically determine the optimal quality for the image to achieve the smallest file size while maintaining the perceived visual quality.

Imagizer employs binary search and image similarity algorithms to make multiple attempts at compressing the image. It then compares the results with the original image to identify the best quality setting.

The algorithm is based off the jpeg-archive library.

http
GET /image.jpg?quality=auto HTTP/1.1
See Example

TIP

Use the quality_attempts, quality_method, quality_preset, quality_target, quality_min, and quality_max parameters to customize the auto quality behavior dynamically.

See the Auto Quality config reference to customize the default values and presets.

WARNING

The auto quality setting is resource intensive and will take longer to process than a fixed quality setting.

quality_attempts New!

The number of binary search steps to perform when using the quality=auto. The default value is 6. Lowering this number will reduce the processing time but may result in a lower quality image.

http
GET /image.jpg?quality=auto&quality_attempts=3 HTTP/1.1

quality_method New!

Specify the image comparison algorithm to use for auto quality. The default value is ssim.

http
GET /image.jpg?quality=auto&quality_method=mpe HTTP/1.1
MethodDescription
ssimStructural Similarity
mpeMean Pixel Error
smallfryLinear-weighted BBCQ-like Smallfry

quality_preset New!

Specify the preset target for the image compare algorithm. The default value is medium.

http
GET /image.jpg?quality=auto&quality_preset=medium HTTP/1.1
Presetssimmpesmallfry
low0.9991.5100.75
medium0.99991.0102.25
high0.999950.8103.8
veryhigh0.999990.6105.5
See Example

quality_target New!

Specify the target for the image compare algorithm. This parameter takes precedence over the quality_preset parameter.

http
GET /image.jpg?quality=auto&quality_target=.99 HTTP/1.1
See Example

quality_min New!

Specify the minimum quality setting to use when compressing the image. The default value is 40.

http
GET /image.jpg?quality=auto&quality_min=25 HTTP/1.1

quality_max Coming soon!

Specify the maximum quality setting to use when compressing the image. The default value is 90.

http
GET /image.jpg?quality=auto&quality_max=80 HTTP/1.1

recognition

WARNING

At present, the recognition feature is exclusively accessible through our cloud service. Imagizer Cloud.

nsfw

Detect if an image contains nudity.

http
GET /image.png?recognition=nsfw HTTP/1.1
See Example

Example JSON response object:

json
{
  "nsfw": {
    "nudity": {
      "confidence": 98.48,
      "value": false
    }
  }
}

labels

Detect and retrieve labels describing the image content. Identifies objects (vehicles, pets, furniture) and scenes (sunset, beach) with confidence scores.

http
GET /image.png?recognition=labels HTTP/1.1
See Example

Example JSON response object:

json
{
  "labels": [
    {
      "Name": "Animal",
      "Confidence": 98.966850280762
    },
    {
      "Name": "Horse",
      "Confidence": 98.966850280762
    },
    {
      "Name": "People",
      "Confidence": 98.813423156738
    },
    {
      "Name": "Human",
      "Confidence": 98.749732971191
    },
    {
      "Name": "Cafe",
      "Confidence": 87.56616973877
    },
    {
      "Name": "Vehicle",
      "Confidence": 83.645690917969
    },
    {
      "Name": "Bazaar",
      "Confidence": 71.16487121582
    },
    {
      "Name": "Market",
      "Confidence": 71.16487121582
    },
    {
      "Name": "Carriage",
      "Confidence": 67.355987548828
    },
    {
      "Name": "Horse Cart",
      "Confidence": 67.355987548828
    }
  ]
}

redeye

Apply red-eye correction to any detected faces.

http
GET /image.jpg?redeye=true HTTP/1.1
See Example

region

Override the awsAuthorization S3 region.

http
GET /image.png?bucket=my.s3.bucket&region=us-west-1 HTTP/1.1

TIP

Requires the bucket parameter.

resolve

Provide a custom address for a specific host and port pair, bypassing DNS resolution for origin requests.

http
GET /image.png?origin=https://www.example.com&resolve=www.example.com:80:192.0.2.1 HTTP/1.1

TIP

Requires the origin parameter.

rotate

Rotate the image clockwise N degrees.

http
GET /image.jpg?rotate=90 HTTP/1.1

TIP

Many JPEG files have a tag in the header giving the image orientation. If there’s an orientation tag, Imagizer automatically applies and removes it. Use autorotate=false to disable that function.

TIP

Rotating the image by degrees smaller than 90 will result in padding the background. Use the zoom crop to auto crop out the padding or use the pad_color to set the padding color.

TIP

Use the angle parameter to rotate the image counterclockwise.

See Example

saturation

Adjust the saturation of the image (-1 to 1).

http
GET /image.jpg?saturation=1 HTTP/1.1
See Example

shadow

Adjust the brightness of the image shadows (-1 to 1).

http
GET /image.jpg?shadow=1 HTTP/1.1
See Example

sharp_amount

Set the overall strength of the sharpening effect (1 to 100).

http
GET /image.jpg?sharp_amount=100 HTTP/1.1
See Example

sharp_radius

Set the size of the edges to enhance (1 to 100).

http
GET /image.jpg?sharp_amount=100&sharp_radius=100 HTTP/1.1

TIP

Requires the sharp_amount parameter.

See Example

source_url

Provide the full URL of the origin image including the hostname.

http
GET /?source_url=http://example.com/image1.jpg?width=100 HTTP/1.1

TIP

The source_url parameter can be disabled in config.

strip_exif

Strip all EXIF data from the image. This can significantly reduce file size.

http
GET /image.png?strip_exif=true HTTP/1.1

trim

Remove a border from around the image. Trims white by default. Use trim_color to specify a different color.

http
GET /image.png?trim=color HTTP/1.1
See Example

trim_color

The color to trim when trim=color.

Some of the predefined values are: white, black, red, green, blue, yellow, magenta, and cyan. trim_color will also accept a hex string (e.g. fff, ffffff).

http
GET /image.png?trim=color&trim_color=555 HTTP/1.1

TIP

Requires the trim parameter.

See Example

vibrance

Adjust the vibrance of an image (-1 to 1).

http
GET /image.jpg?vibrance=1 HTTP/1.1
See Example

warmth

Adjust the warmth of an image (-1 to 1).

http
GET /image.jpg?warmth=1 HTTP/1.1
See Example

width

Scale the image to the given width. Height is calculated automatically to preserve aspect ratio.

TIP

Alias: w (e.g., w=200).

http
GET /image.jpg?width=200 HTTP/1.1
See Example

Last updated: