ch cannot be set as a Source's default parameter, due to the way it interacts with imgix's caching infrastructure.
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:
Widthoverrides the imgix
DPRoverrides the imgix
Save-Datareduces image quality to
q=45and 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, the URL below will take advantage of the
DPR Client Hints if present and fall back to an image that's 400 device-independent pixels wide at 2 DPR if the browser doesn't support them:
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 to ensure that the headers are sent to the browser:
<meta http-equiv="Accept-CH" content="Width,DPR">
For more information and use cases, please see the following:
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.