Skip to main content

Giphy

The giphy module lets editors search and import GIFs and stickers from Giphy through Brightspot's federated search.

Dependencies

Depends on db-http and the Giphy REST API v1 (api.giphy.com), called directly over HTTP.

Installation

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

API reference

com.psddev.giphy.GiphyDatabase

Extends HttpDatabase. Searches Giphy's GIF or sticker search endpoint for a keyword, or returns trending results when the editor hasn't typed a keyword.

com.psddev.giphy.GiphyImage

Extends ExternalItem.

FieldTypeDescription
titleStringThe GIF's title.
authorStringThe GIF uploader.
dateCreatedDateWhen the GIF was created in Giphy.
ratingStringThe content rating, defaulting to PG-13 when unfiltered.
giphyIdStringThe Giphy Id.
previewUrlStringA preview image URL.
sourceStringThe GIF's source URL.
gifTypeGiphyGifTypeWhether the result is a GIF or a sticker. Filterable in search.
contentRatingGiphyContentRatingThe content rating (Y, G, PG, PG13, or R). Filterable in search.

Configuration

The API key is stored on GiphySettings, a Modification<CmsTool> shown under Site Settings > Integrations > Giphy. GiphySettings also has a useStillImages toggle that shows a still image instead of an animated preview in search results. Giphy is hidden from search entirely until an API key is set.

Extending the plugin

The module doesn't ship a content type for imported GIFs. To let editors create one from search results, define a content type and extend ExternalItemConverter<GiphyImage, 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.