raen79 / elm-imgix / ImgIX.Automatic

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

ImgIx documentation for Automatic


type Automatic

The Automatic type

Available automatic optimizations

compress : Automatic

When 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. auto=format is respected, so images will be served in a WebP format whenever possible. 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.

enhance : Automatic

When 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.

fileFormat : Automatic

When fileFormat is set, imgix determines whether the image can be served in a better format by a process called automatic content negotiation.

redEyeRemoval : Automatic

When redEyeRemoval is set, red-eye removal is applied to any detected faces.

Applying

toQueryParameter : List Automatic -> Url.Builder.QueryParameter

Takes a list of automatics and turns it in to a query parameters that ImgIX understands