Documentation

ch Client Hints

The ch parameter opts in specific images to use Client Hints, which provide automatic resource selection using browser headers. imgix currently supports three hints, which override or change their respective imgix parameters:

  • Width overrides the imgix w parameter
  • DPR overrides the imgix dpr parameter
  • Save-Data reduces image quality to q=45 and may change the output format of the image

You can use multiple Client Hints—values should be comma-separated. If the browser does not support Client Hints, the other values present in the URL will be used. For example, this URL will take advantage of the Width and DPR Client Hints when present and fall back to an image that’s 400 device-independent pixels wide at 2 DPR:

https://assets.imgix.net/unsplash/bear.jpg?ch=Width,DPR&w=400&dpr=2

Note: All browsers that support Save-Data will send the header, regardless of whether or not the Client Hint meta tag is present. However, if you want to use the other Client Hints, you will need to include the following in your site’s <meta> tags:

<meta http-equiv="Accept-CH" content="{hint_names_comma_separated}">

For more information and use cases, please see the following: