# Discourse Gifs

**URL:** https://meta.discourse.org/t/discourse-gifs/158738
**Category:** Theme component
**Tags:** official, gifs
**Created:** [July 24, 2020, 10:24pm UTC](https://meta.discourse.org/t/discourse-gifs/158738 "2020-07-24T22:24:05Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [July 24, 2020, 10:24pm UTC](https://meta.discourse.org/t/discourse-gifs/158738/1 "2020-07-24T22:24:05Z")

</div>

| | | |
| --- | --- | --- |
| :discourse2: | **Summary** | **Discourse Gifs** adds a button to the composer that allows you to search for gifs and easily add the best one to your post. |
| 🛠 | **Repository Link** | [https://github.com/discourse/discourse-gifs](https://github.com/discourse/discourse-gifs) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

> [@](#):
>
> :discourse2: As this is an #official theme component maintained by the Discourse team, #Support, #Contribute > Bug, #Contribute > UX, and #Contribute > Feature requests can be made in the respective categories here on Meta, and tagged with the appropriate theme component tag. Click on a link below to get one started. 👍
> 
> [❓&nbsp; **Support**](https://meta.discourse.org/new-topic?category_id=6&tags=gifs "Ask for support on configuring and using Discourse Gifs") [🐛&nbsp; **Bug**](https://meta.discourse.org/new-topic?category_id=1&tags=gifs "A bug report means something is broken, preventing normal/typical use of the theme component") [👀&nbsp; **UX**](https://meta.discourse.org/new-topic?category_id=9&tags=gifs "Discussion about the user interface of Discourse Gifs, and how features are presented (including language and UI elements)") [💡&nbsp; **Feature**](https://meta.discourse.org/new-topic?category_id=2&tags=gifs "Discussion about how existing Discourse Gifs features can be improved or enhanced, and how proposed new features could work")

### Features

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/c/6ca9aaf2440c0cd9a952456fca0737f1076cf9d1.png)

After searching you get an infinite scrolling wall of related gifs:

![recording](https://global.discourse-cdn.com/meta/original/3X/c/a/caaa41374093f847ad312d635a864900d54ba8d3.webp)

Clicking one one inserts it on your current composer, which looks like:

![shut up and take my money GIF by Product Hunt](https://global.discourse-cdn.com/meta/original/3X/4/e/4e19cae7c6bdc4291fb346aaed6b4627fb1b6996.webp)

This is heavily based on a old fork of [ReplyGif: Adding reaction GIF easily](https://meta.discourse.org/t/replygif-adding-reaction-gif-easily/33195), so thanks to @cpradio.

The big differences are:

- It can use animated webp instead of gifs, so it’s a lot more efficient for bandwidth.

- It is a theme-component, so it is way easier to install and update.

- It offers the choice of Giphy API or the Tenor API.

- Infinite Scrolling for results

- Resulting gifs are downloaded to Discourse using our native bitrot protection. You can disable this behavior using existing settings if space is a concern.

- No need to fiddle with nginx to setup a proxy for HTTPS

### Obtaining a Giphy API Key

For the component to work you need to visit [Dashboard | GIPHY Developers](https://developers.giphy.com/dashboard/?create=true) and click like:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/1/b12e8a7dbd809fa7388d76b56348dfd9ad7cebc1.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/4/f404fdd1e1f3ccde6036ca1066e1f6f56abde4e5.png)

Fill up the form and the API key will be show as:

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/d/dd7c57e760fe23110cc4231dda5d42ab7e925bb9.png)

### Obtaining a Tenor API key

Get that key at the official Tenor site: [GIF API - Better, Faster & Free | Get Your GIFs with Tenor](https://tenor.com/gifapi)

After that visit the theme-component page in Discourse and fill up the settings, e.g:

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/4/84c9ae2315ec3e9a55ea4614696755ad46cbce87.png)

### Settings

| Name | Description |
| --- | --- |
| api provider | Which GIF provider should we use? |
| giphy api key | GIPHY: API key |
| giphy file format | GIPHY: Image format to use. WEBP has smaller files that load quicker while GIF provides compatibility with old browsers. |
| giphy content rating | GIPHY: Content rating for search results. Find more info at [https://developers.giphy.com/docs/optional-settings#rating](https://developers.giphy.com/docs/optional-settings#rating). |
| giphy locale | GIPHY: Language to use on the search. Used to cater search to regional content. Set to your default forum locale. |
| limit infinite search results | Limit the number of GIF results returned as the user scrolls infinitely to prevent API Rate Limiting. |
| max results limit | Tenor & GIPHY: When “limit infinite search results” is enabled, we will search until we get this number of maximum GIF results. Each API call retrieves 24 results, _e.g. 240 Max Limit: 240 / 24 = 10 API Calls_ . |
| tenor api key | Tenor: V2 API Key. Instructions to get one can be found in [Discourse Meta - Discourse Gifs](https://meta.discourse.org/t/discourse-gifs-component/158738). |
| tenor client key | Tenor: (optional) client-specified string that represents the integration |
| tenor file detail | Tenor: Image format to use |
| tenor content filter | Tenor: Content safety level for Tenor results. Find more info in [Tenor API Guides](https://developers.google.com/tenor/guides/content-filtering). |
| tenor country | Tenor: Two-Letter Country of Origin for the request. Find your country code in [Wikipedia - ISO\_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes). |
| tenor locale | Tenor: Language to use on the search. Country code (optional) can be provided to differentiate between dialects. |

| Translation | Deafault |
| --- | --- |
| gif.modal\_title | Search GIFs |
| gif.query | Term |
| gif.insert | Insert Selected Images |
| gif.composer\_title | Search GIFs |
| gif.no\_results | Enter a keyword in the input box above to search for GIFs. |
| gif.bad\_api\_key | Invalid $api\_provider API Key. Site admins, please check your key and/or your $api\_provider account. |
| gif.error\_rate\_limit | We have reached our $api\_provider API Rate Limits. Please wait and try again later. If this issue persists, contact your site admin. |
| gif.error\_search\_too\_long | Please shorten your search query to under 50 characters and try again. |

  

> :discourse2: **Hosted by us?** Theme components are available to use on our Standard, Business, and Enterprise plans.

> Last edited by @JammyDodger 2024-06-12T10:45:10Z
> 
> > **Check document**
> >
> > Perform check on document:

---

_[View the full topic](https://meta.discourse.org/t/discourse-gifs/158738)._
