Skip to main content

Getty Images

The getty module lets editors search and import licensed images from Getty Images through Brightspot's federated search.

Dependencies

Depends on db-http and the official Getty Images API SDK (com.gettyimagesapi-sdk), which wraps Getty's search, detail, and downloads APIs.

Installation

<!-- Requires Brightspot 5.0 or later. -->
<dependency>
<groupId>com.brightspot.dbhttp</groupId>
<artifactId>getty</artifactId>
<version>1.0.0</version>
</dependency>

API reference

com.psddev.getty.GettyDatabase

Extends HttpDatabase. Translates the query's keyword, filters, and sort order into Getty's search API parameters, and requests full-resolution downloads through Getty's Downloads API when licensing allows it.

com.psddev.getty.GettyImage

Extends ExternalItem.

FieldTypeDescription
titleStringThe image's title.
gettyIdStringThe Getty Images Id.
previewUrlStringA watermarked preview image URL.
captionStringThe image caption.
artistStringThe artist credited for the image.
creditStringThe image credit line.
editorialSourceStringThe editorial source name.
copyrightStringThe image's copyright notice.
dateSubmittedDateWhen the image was submitted to Getty.
dateCreatedDateWhen the image was created.
keywordsSet<String>Getty keywords assigned to the image.
ageOfPeopleList<String>Filterable age-of-people categories depicted in the image.
specificPeopleList<String>Filterable named people depicted in the image.
ethnicityList<String>Filterable ethnicity categories depicted in the image.
numberOfPeopleList<String>Filterable number-of-people categories depicted in the image.
orientationList<String>Filterable image orientation categories.
colorStringThe image's dominant color, filterable with a color picker.

Sort order is set through the GettyImageSort enum: BEST_MATCH, MOST_POPULAR, or NEWEST.

Configuration

Credentials are stored on com.psddev.getty.GettyApiClient (name, apiKey, apiSecret), referenced from GettySettings, a Modification<SiteSettings> shown under Site Settings > Integrations > Getty. GettySettings also has a downloadFullImages toggle controlling whether the module attempts a full-resolution download or falls back to the preview image.

Extending the plugin

The module doesn't ship a content type for imported images. To let editors create one from search results, define a content type and extend ExternalItemConverter<GettyImage, T> to convert the external item into it on import, downloading the image with GettyImage#generateStorageItemFromUrl.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.