Documentation

Image URL API Reference

The Image URL API is the heart of the imgix service. By adding these parameters to your image URLs, you can enhance, resize and crop images, compress them and change format for better performance, create complex compositions, and extract useful metadata. These operations can be applied programmatically in real time across entire image libraries, removing the need to batch process or maintain multiple copies of an image to match device breakpoints.

This section of the documentation describes all of the parameters available in the imgix URL API and includes live examples that you can experiment with. For more detailed information about how to implement for specific use cases, please see the Tutorials section. To learn more about the basics of serving images once you’ve set up the service, read the Serving Images guide.

Base64 Variants

All imgix parameter values can be encoded using a URL-safe Base64 scheme. To use this approach, pre-encode the value, and append 64 to the end of the parameter name. For example, txt becomes txt64.

Please keep in mind that this uses the URL-safe alphabet as defined in RFC 4648.

Here’s an example:

?txt=Hello%2C%20World!

becomes the following when URL-safe Base64 encoded:

?txt64=SGVsbG8sIFdvcmxkIQ

Generating Base64-encoded parameters is easy in many languages. Here’s an example of how to do it in Ruby:

require "base64"
Base64.urlsafe_encode64("Hello, World!").delete('=')
#=> "SGVsbG8sIFdvcmxkIQ"

Many of the imgix client libraries automatically encode strings passed to Base64 variant parameters. Check whichever library you’re using for specific details of its implementation.

All Parameters (by Category)

Adjustment

Automatic

Background Color

Blending

Border & Padding

Color Palette

Device Pixel Ratio

Face Detection

Focal Point Crop

Format

Mask Image

Noise Reduction

PDF Page Number

Rotation

Size

Stylize

Text

Trim

Typesetting Endpoint

Watermark