Skip to main content

Shutterstock

The shutterstock module lets editors search and import licensed images from a linked Shutterstock account through Brightspot's federated search.

Dependencies

Depends on db-http and the Shutterstock API v2 (api.shutterstock.com/v2), authenticated with OAuth2.

Installation

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

API reference

com.psddev.shutterstock.ShutterstockDatabase

Extends HttpDatabase. Searches Shutterstock's image search endpoint on behalf of the editor's linked account, or their enterprise account if one is available.

com.psddev.shutterstock.ShutterstockImage

Extends ExternalItem.

FieldTypeDescription
shutterstockIdStringThe Shutterstock image Id.
previewUrlStringA watermarked preview image URL.
dateAddedDateWhen the image was added to Shutterstock.
categoriesSet<String>Shutterstock categories assigned to the image.
contributorIdStringThe contributor's Shutterstock Id.
descriptionStringThe image description.
imageTypeStringThe Shutterstock image type.
adultBooleanWhether Shutterstock flags the image as adult content.
illustrationBooleanWhether the image is an illustration rather than a photograph.
keywordsSet<String>Shutterstock keywords assigned to the image.

Sort order is set through the ShutterstockImageSort enum: POPULAR, NEWEST, RELEVANCE, or RANDOM. Importing a full-resolution image requires the linked account to have an active subscription; otherwise the module falls back to the preview image.

Configuration

The OAuth2 consumer key and secret are stored on com.psddev.shutterstock.ShutterstockApiClient, referenced from ShutterstockSettings, a Modification<SiteSettings> shown under Site Settings > Integrations > Shutterstock. Each editor additionally links their own Shutterstock account before they can search Shutterstock.

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<ShutterstockImage, T> to convert the external item into it on import.

Was this page helpful?

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