adaptiveImageCompression


The Adaptive Image Compression feature compresses JPEG images depending on the requesting network's performance, thus improving response time. The behavior specifies three performance tiers based on round-trip tests: 1 for excellent, 2 for good, and 3 for poor. It assigns separate performance criteria for mobile (cellular) and non-mobile networks, which the compress‚ÄčMobile and compress‚ÄčStandard options enable independently.

There are six method options, one for each tier and type of network. If the method is COMPRESS, choose from among the six corresponding slider options to specify a percentage. As an alternative to compression, setting the method to STRIP removes unnecessary application-generated metadata from the image. Setting the method to BYPASS serves clients the original image.

The behavior serves ETags headers as a data signature for each adapted variation. In case of error or if the file size increases, the behavior serves the original image file. Flushing the original image from the edge cache also flushes adapted variants. The behavior applies to the following image file extensions: jpg, jpeg, jpe, jif, jfif, and jfi.

OptionTypeDescriptionRequires
compress‚ÄčMobileboolean

Adapts images served over cellular mobile networks.

{"displayType":"boolean","tag":"input","type":"checkbox"}
tier1Mobile‚ÄčCompression‚ÄčMethodenum

Specifies tier-1 behavior.

compress‚ÄčMobile is true
{"displayType":"enum","options":["COMPRESS","BYPASS","STRIP"],"tag":"select"}
{"if":{"attribute":"compressMobile","op":"eq","value":true}}
Supported values:
BYPASS
COMPRESS
STRIP
tier1Mobile‚ÄčCompression‚ÄčValuenumber (0-100)

Specifies the compression percentage.

tier1Mobile‚ÄčCompression‚ÄčMethod is COMPRESS
{"displayType":"number","max":[100],"min":[0],"tag":"input","type":"range"}
{"if":{"attribute":"tier1MobileCompressionMethod","op":"eq","value":"COMPRESS"}}
tier2Mobile‚ÄčCompression‚ÄčMethodenum

Specifies tier-2 cellular-network behavior.

compress‚ÄčMobile is true
{"displayType":"enum","options":["COMPRESS","BYPASS","STRIP"],"tag":"select"}
{"if":{"attribute":"compressMobile","op":"eq","value":true}}
Supported values:
BYPASS
COMPRESS
STRIP
tier2Mobile‚ÄčCompression‚ÄčValuenumber (0-100)

Specifies the compression percentage.

tier2Mobile‚ÄčCompression‚ÄčMethod is COMPRESS
{"displayType":"number","max":[100],"min":[0],"tag":"input","type":"range"}
{"if":{"attribute":"tier2MobileCompressionMethod","op":"eq","value":"COMPRESS"}}
tier3Mobile‚ÄčCompression‚ÄčMethodenum

Specifies tier-3 cellular-network behavior.

compress‚ÄčMobile is true
{"displayType":"enum","options":["COMPRESS","BYPASS","STRIP"],"tag":"select"}
{"if":{"attribute":"compressMobile","op":"eq","value":true}}
Supported values:
BYPASS
COMPRESS
STRIP
tier3Mobile‚ÄčCompression‚ÄčValuenumber (0-100)

Specifies the compression percentage.

tier3Mobile‚ÄčCompression‚ÄčMethod is COMPRESS
{"displayType":"number","max":[100],"min":[0],"tag":"input","type":"range"}
{"if":{"attribute":"tier3MobileCompressionMethod","op":"eq","value":"COMPRESS"}}
compress‚ÄčStandardboolean

Adapts images served over non-cellular networks.

{"displayType":"boolean","tag":"input","type":"checkbox"}
tier1Standard‚ÄčCompression‚ÄčMethodenum

Specifies tier-1 non-cellular network behavior.

compress‚ÄčStandard is true
{"displayType":"enum","options":["COMPRESS","BYPASS","STRIP"],"tag":"select"}
{"if":{"attribute":"compressStandard","op":"eq","value":true}}
Supported values:
BYPASS
COMPRESS
STRIP
tier1Standard‚ÄčCompression‚ÄčValuenumber (0-100)

Specifies the compression percentage.

tier1Standard‚ÄčCompression‚ÄčMethod is COMPRESS
{"displayType":"number","max":[100],"min":[0],"tag":"input","type":"range"}
{"if":{"attribute":"tier1StandardCompressionMethod","op":"eq","value":"COMPRESS"}}
tier2Standard‚ÄčCompression‚ÄčMethodenum

Specifies tier-2 non-cellular network behavior.

compress‚ÄčStandard is true
{"displayType":"enum","options":["COMPRESS","BYPASS","STRIP"],"tag":"select"}
{"if":{"attribute":"compressStandard","op":"eq","value":true}}
Supported values:
BYPASS
COMPRESS
STRIP
tier2Standard‚ÄčCompression‚ÄčValuenumber (0-100)

Specifies the compression percentage.

tier2Standard‚ÄčCompression‚ÄčMethod is COMPRESS
{"displayType":"number","max":[100],"min":[0],"tag":"input","type":"range"}
{"if":{"attribute":"tier2StandardCompressionMethod","op":"eq","value":"COMPRESS"}}
tier3Standard‚ÄčCompression‚ÄčMethodenum

Specifies tier-3 non-cellular network behavior.

compress‚ÄčStandard is true
{"displayType":"enum","options":["COMPRESS","BYPASS","STRIP"],"tag":"select"}
{"if":{"attribute":"compressStandard","op":"eq","value":true}}
Supported values:
BYPASS
COMPRESS
STRIP
tier3Standard‚ÄčCompression‚ÄčValuenumber (0-100)

Specifies the compression percentage.

tier3Standard‚ÄčCompression‚ÄčMethod is COMPRESS
{"displayType":"number","max":[100],"min":[0],"tag":"input","type":"range"}
{"if":{"attribute":"tier3StandardCompressionMethod","op":"eq","value":"COMPRESS"}}