Summary

Outward’s Imager service is an image processing and retrieval engine. It is a hosted web service accessible via REST API that provides convenient access to product imagery with on-demand post-processing capabilities. Image content from Imager can be integrated into any website. The service requires no plugins and is broadly compatible with all mainstream Web Browsers, Operating Systems, and Devices (including mobile).

API

Users of Outward’s Imager service can use the provided REST API to retrieve images provided by Outward, and optionally apply any combination of post-processing effects by supplying corresponding query string parameters.

The first time a call is made to the Imager service for a specific processed image, there will be a performance impact as the image is generated. The generated image is then cached, allowing subsequent calls to be much faster.

The components of a REST API call to the Imager service are as follows:

  • The protocol -- both http and https are well-supported.
  • The application base name -- this will be cb-imager.outwardinc.com.
  • The image identifier -- This is either the path to the image, or query parameters that identify the image as a search result from the SKU Manager.
  • The processing parameters -- Optional set of post processing effects to apply to the image.

Some hypothetical examples of Outward Imager REST API URLs are:

  • https://cb-imager.outwardinc.com/image.jpg?sku=MYSKU_0160&width=1024&height=768&trim&padding=10&bg=white
  • https://cb-imager.outwardinc.com/customnamedimage.jpg?sku=MYSKU_0160&width=1024&height=768&trim&padding=10&bg=white
  • https://cb-imager.outwardinc.com/image/Collection1/MYSKU_0160.png?height=1080&trim&background=transparent

Protocol

This is simply either HTTP or HTTPS. We support both although you can expect a small performance hit when using a secure connection.

Application Base Name

This is our domain address in which to access the Imager service. This should always be http://cb-imager.outwardinc.com.

Image Identifier

There are two ways to identify the image you want to retrieve. Note that all images available are provided and maintained by Outward.

  1. Full path identifier
    • If you know the exact path to find your image (as organized by Outward), you can fetch it directly.
    • The format is as follows:
      • http://cb-imager.outwardinc.com/image/[path].[ext]
      • [path] -- The path to the image
      • [ext] -- The desired output file format extension (such as "png", "jpg", or "jpeg")
  2. Category search identifier
    • This method allows you to provide category search values to find the image based on information stored in Outwards' SKU Manager.
    • The format is as follows:
      • http://cb-imager.outwardinc.com/[name].[ext]?[categories]
      • [name] -- Any desired name you wish the file to be downloaded as
      • [ext] -- The desired output file format extension (such as "png", "jpg", or "jpeg")
      • [categories] -- Any number of key/value pairs that identify your image. The image is found based on a search query to Outwards' SKU Manager service.

Processing Parameters

If you wish to perform dynamic post processing to the source image, you can also provide the following query parameters. Note, properties are case sensitive and should always be lower-case letters.

width (w), height (h)

A pixel width and/or height value to force the final output image. If only one dimension is provided, that dimension will be assigned while the other will dynamically resize to fit the same aspect ratio of the original source. If both dimensions are provided, the image will shrink to fit entirely and padding of the background color will be inserted to fill the empty space. “w” and “h” can be used as shorthand for these parameters.

crop (c)

If both height and width were supplied, the default behavior is to add padding. However, if this parameter is supplied, the image will instead fill the entire image and then crop to the desired size. “c” can also be used as shorthand for this parameter.

trim (t)

This will trim “boring” pixels from all edges of the image, essentially removing extra padding from all sides. This operation is performed before the image is resized according to width and height. “t” can also be used as shorthand for this parameter.

padding (p)

This option provides extra padding around the border of the image using the background color. If the padding applied to all sides is larger than the image itself, an error is returned. The value is a pixel size to apply to all sides. “p” can be used as shorthand for this parameter.

background (bg)

This specifies the background color to use when adding padding or flattening a transparent source image and the default value is “white”. If your source images contain transparency and you wish to keep it, use “transparent”. “bg” can be used as shorthand for this parameter.