auto parameter helps you automate a baseline level of optimization across your entire image catalog. Currently, it has four different methods:
- Visual enhancement
- File format conversion
- Redeye removal
With the exception of
auto=format, you can apply these values as default parameters at the Source level, improving image speed and appearance with no coding at all.
auto=format to a URL after other
auto values have been added as a default parameter will cause those parameters to be combined in the final rendered image. For example, if you have
auto=compress,enhance as a default parameter, adding
auto=format to the image URL will cause the final image to be parsed by imgix as
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,
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. Additionally, it is the only parameter that can be combined by reiteration, e.g.
auto=compress is set, imgix will apply best-effort techniques to reduce the size of the image. This includes altering our normal processing algorithm to apply more aggressive image compression. If the WebP format is not supported, images that contain transparency will be served in a PNG8 format (if supported) and all others will be served as JPEG. The quality standard (
q) is set to 45.
auto=format is included in the parameters, it will be respected. In this case, images will be served in WebP format whenever possible, regardless of transparency, while still applying compression.
Note: We strive to reduce file size while maintaining as much visual information as possible, so the operations applied are subject to change. Adding
cs=srgb will resolve color issues by adding the color space back. Additionally, the default quality standard can be overridden by using the
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.
auto=format is set, imgix determines whether the image can be served in a better format by a process called automatic content negotiation. It compiles 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.
auto=format is the only parameter that cannot be set as a Source's default parameter, due to the way it interacts with our caching infrastructure.
To learn more about
auto=format and auto content negotiation, read our tutorial.
auto=formatwill return either a JPEG or a PNG in affected Safari versions.
auto=redeye is set, red-eye removal is applied to any detected faces.
This parameter does not accept base64-encoded values. All values must be provided as standard UTF8, url-encoded strings.
See the API specification for more information about this parameter's value ranges and format.