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.
gettyTokenURL#
The URL that implements the OAuth flow with Getty's resource server.
This defaults to the current host with the path api/token.
gettyTokenURL#
Promise that returns the OAuth token. This option provides more flexibility than the gettyTokenURL.
displaySize#
The size of the preview image displayed by the editor.
searchParams#
Search parameters for the Getty Images API, refer to Getty Images documentation for a complete list.
imageSize#
The size of the final image generated on export.
endpoint#
Allows setting the default image search endpoint. If left blank all images will be searched.
onConfirm#
A function that is invoked on export before licensing an image passing the following arguments:
onExportLicensedImagelicenses the image, loads it into the editor and returns the URL for the licensed image for further handling.imagecontains image metadata as returned by the Getty Images API.onLicenselicenses the image and returns a URL without loading it into the editor.onClicktriggers the export event which can be used to save a serialization of the editor state.