Search Documentation

auto Automatic

The auto parameter helps you automate a baseline level of optimization across your entire image catalog. Currently, it has four different methods:

  • Compression
  • Visual enhancement
  • File format conversion
  • Redeye removal

With the exception of auto=format, you can apply these values as default parameters at the account level, improving image speed and appearance with no coding at all.

If necessary for your image needs, you can override the settings that auto represents, either on a per-image basis or in your code. For example, auto=compress applies cs=strip to remove color profile metadata, but if it’s necessary for your site, you can append a different value for cs in your image URL.

auto values can be combined with comma separation, e.g. auto=compress,enhance.

auto=compress

When auto=compress is set, imgix will apply best-effort techniques to reduce the size of the image. This includes more aggressive image compression, reducing the quality setting (q) to 45, and stripping color profile metadata. If auto=format is also set, there may be additional file size savings from switching formats.

Note: We strive to reduce file size while maintaining as much visual information as possible, so the operations applied are subject to change.

auto=enhance

When auto=enhance is set, the image is adjusted using the distribution of highlights, midtones, and shadows across all three channels—red, green, and blue (RGB). Overall, the enhancement gives images a more vibrant appearance.

The adjustment affects individual images differently, and works best with editorial photography, stock photography, and user-generated content for social media applications.

Original
Example 001
auto=enhance
Example 001
Original
Example 002
auto=enhance
Example 002

auto=format

When auto=format is set, imgix chooses the most appropriate file format for your image. We use a process called automatic content negotiation to compile the various signals available to us—including headers, user agents, and image analytics—to select the optimal image format for your user. This format is served back and the image is correctly cached.

Note: auto=format cannot be set as a Source’s default parameter, due to the way it interacts with our caching infrastructure.

When auto is set to format, imgix chooses the most appropriate file format for delivering your image based on the requesting web browser. We use a process called automatic content negotiation to compile the various signals available to us—including headers, user agents, and image analytics—to select the optimal image format for your user. This format is served back and the image is correctly cached.

Behind the scenes, these are the steps we take during content negotiation:

  1. Check if your browser supports WebP. If it does, we serve back a WebP image.
  2. Check if the request has a fallback format set by the fm parameter. If it does, we serve back the image in the fallback format.
  3. If the browser is not compatible with either format, serve back the image in its original format.

To learn more about auto=format and auto content negotiation, read our tutorial.

auto=redeye

When auto=redeye is set, red-eye removal is applied to any detected faces.