Skip to main content

Configuration Settings of Getty Images Library SDK

In this example, we will show you how to configure the Getty Images Library SDK.

In addition to the PE.SDK's basic configuration options the Getty Images Library SDK comes with a set of additional configuration parameters.


The client-side Getty Images API key which you can request here.


The URL that implements the OAuth flow with Getty's resource server. This defaults to the current host with the path api/token.


Promise that returns the OAuth token. This option provides more flexibility than the gettyTokenURL.


The size of the preview image displayed by the editor.


Search parameters for the Getty Images API, refer to Getty Images documentation for a complete list.


The size of the final image generated on export.


Allows setting the default image search endpoint. If left blank all images will be searched.


A function to handle errors occurring at the API level. Reference the full list here.


A function that is invoked on export before licensing an image passing the following arguments:

  • onExportLicensedImage licenses the image, loads it into the editor and returns the URL for the licensed image for further handling.
  • image contains image metadata as returned by the Getty Images API.
  • onLicense licenses the image and returns a URL without loading it into the editor.
  • onClick triggers the export event which can be used to save a serialization of the editor state.