Image Adaptation Configuration

Image Adaptation is a query string-based API that uses Instart's image processing capabilities to apply a variety of operations to images in JPG, PNG, GIF and animated GIF formats. We can

  • resize images to a specific pixel size, a relative percentage of the original image, or a maximum or minimum dimension
  • crop images to a specific size from a specified set of coordinates relative to the image's borders
  • filter images to grayscale or black and white
  • sharpen images to reduce apparent blurriness
  • add a border of a specified color and size
  • chain any of these operations (processed in the order specified)

This allows you to store a single high-resolution image on a backend origin web server and then process images as needed when they are delivered through our service. This allows, for example, sending smaller images to mobile and tablet devices with smaller screens and providing thumbnails for larger images.

Note

Images for Image Adaptation must be JPGs, PNGs, GIFs, or animated GIFs only.

Images can be processed using simple commands that are added to the query string of an image’s URI.

For details on how to use the Image Adaptation API, see the document What is Image Adaptation?

There is only one user-configurable property configuration parameter for Image Adaptation – it is either enabled or not using an op block inside a image_resize block.

"image_resize" : {
  "op" : {
    "enable" : true
  }
},

Enabling the adaptation feature on images requires that the image has a positive cache TTL. Note that this means if you attempt to process an image that does not have a configured TTL, or a positive max-age, then the feature will not work. As the operation is presently quite expensive, we should try to only use this on images that have a high cache TTL. For example:

"cache" : {
  "edge_ttl" : "30d",
  "policy" : "FIXED_TTL"
}