All GIPHY content comes in multiple renditions, or sizes and formats, to better suit different use cases. We provide a few ways for developers to customize their UI and provide the best experiences to their users. In general we recommend:
Of course, these configurations are just some of our best practices – GIPHY’s renditions can be configured in lots of different ways.
The only formats that support transparency are GIF and WEBP, so if you are building an experience that includes stickers, make sure to avoid MP4 where you would like to see transparent content. Likewise, different browsers and operating systems support different media types, and you should tailor your media selections to the environment in which you plan to share.
When making requests that return GIF objects, the “Accept” HTTP header can be used to toggle the content type you will receive in return. For example, by making a request to one of our gif URLs with an “Accept” header that begins with “text/html” we assume the request is being made from a browser and render HTML to display the image with extra data. If the “Accept” header begins with any other pattern, then the binary media file for the GIF file type is returned.
You should not rely on size value in the API response being exactly correct every time. This is because we may choose to replace some pre-built renditions with dynamically generated renditions, and we will therefore not have an exact size value in advance.
GIF Grid Picker in a Mobile Application Grid: fixed_height or fixed width MP4 or WEBP. Send: downsized_large, downsized, or downsized_medium MP4 or WEBP.
Many chat and messaging apps use a grid for searching and selecting media. In mobile applications, it is common to implement this grid at either a fixed height or fixed width. To avoid cutting images off, and to present the highest resolution image to your users at the lightest file size, we would recommend using the fixed_height or fixed_width renditions, both of which are scaled to 200px on the appropriate axis in all formats. Use our MP4 or WEBP format for the grid, to speed loading times. You may also choose to load the fixed_height_still or fixed_width_still initially to provide a more seamless scrolling experience.
When the user selects a gif object, developers should call a higher quality rendition to send through to the application. We recommend the downsized_large rendition for this implementation. If you are concerned that this rendition is too large to load quickly, downsized_medium and then downsized are also good options.
GIF Scroll Picker in a Mobile Application Scroll: fixed_width_small or fixed_height_small. Send: downsized_large, downsized, or downsized_medium.
Another common way to implement GIPHY in a Chat application is to implement the Trending Endpoint as a scrolling selection above the keyboard. This calls for a smaller rendition to be used for the preview. We recommend the fixed_width_small or fixed_height_small rendition for this implementation. If speed and/or transfer size are a concern, then you can use the downsampled version; this version is a big compromise on quality as it may remove many frames from the GIF.
When the user selects a gif object, developers should call a higher quality rendition to send through to the application. We recommend the downsized_large rendition for this implementation. Again, if you are concerned that this rendition is too large to load quickly, downsized_medium and then downsized are also good options.
Desktop Application Search and Send Grid: fixed_height or fixed width MP4 or WEBP. Send: original WEBP or MP4.
GIPHY has many high resolution options for desktop applications. Often the best option is the original rendition. If you are looking to decrease load times, choose the original.webp for Chrome users and the original.mp4 for all other browsers. For displaying a large quantity of search results, we recommend our fixed_height or fixed_width renditions in both WEBP and MP4, depending on browser type.
Sticker Layering Grid: fixed_height or fixed_width webp or GIF. Send: original webp or GIF.
One common method of creating a GIF Sticker search interface is to load GIF Stickers into a preview view (probably a UICollectionView on iOS), where users can select one of the GIFs in their search result. The selected GIF is then placed into the image canvas, where it can be manipulated in various ways. Use a higher resolution GIF in the image canvas, but not in the preview view.
Depending on layout, device type, or other needs, a fixed_height or fixed_width rendition will work for your grid. As soon as the user selects an image to drag and drop, your app should begin fetching a higher resolution rendition. For this, we recommend the original in WEBP or GIF.
By default, we return a large number of renditions to support many different use cases. If you wish to pare down the response itself, GIPHY offers optional renditions-on-demand bundles (RoD).
By passing the bundle parameter, GIPHY will respond with only the renditions that pertain to that bundle. This is completely optional; you could also parse the response for the desired renditions yourself within your app.
Common RoD uses cases and filters
Use RoD filter parameter | Implementation Guidelines | Renditions included |
---|---|---|
If your use case is Mobile/Desktop Application with Grid/Carousel Picker for Clips Content Type | ||
clips_grid_picker | Returns renditions with formats that are suitable for loading animated asset grids efficiently. Use the Once the user has selected an content from the grid, use the available renditions from the video object to preview/send the selected clip (with sound) | data.images.fixed_width data.images.original data.video.assets.360p data.video.assets.720p data.video.assets.480p data.video.assets.1080p data.video.assets.source |
If your use case is Mobile/Desktop Application with Grid/Carousel Picker for Messaging using GIFs & Stickers | ||
messaging_non_clips | Returns renditions with formats that are suitable for loading animated asset grids efficiently. Use the Once the user has selected the content from the grid, use the largest possible rendition while sending the content in the message. | data.images.original data.images.fixed_height data.images.fixed_height_downsampled data.images.fixed_height_small data.images.fixed_width data.images.fixed_width_downsampled data.images.fixed_width_small |
If your use case is Mobile/Desktop Application with Grid/Carousel Picker for Sticker Layering in Photo/Video editing tools | ||
sticker_layering | Returns renditions with formats that are suitable for loading animated asset grids efficiently and layering transparent background sticker assets on the canvas. Use the Once the user has selected the sticker from the grid use the url/webP fields from the largest resolution to access the gif/webP formats as layers on top of the canvas | data.images.original data.images.downsized_large data.images.downsized_medium data.images.fixed_height data.images.fixed_height_downsampled data.images.fixed_height_small data.images.fixed_width data.images.fixed_width_downsampled data.images.fixed_width_small |
If your use case is Mobile/Desktop Application with bandwidth limitations eg: MMS only allow assets less than 1MB | ||
low_bandwidth | Returns renditions with formats that are suitable for loading animated content grids efficiently with small size assets. Use Once the user has selected the content from the grid, select the suitable asset to send based on any additional bandwidth restrictions from any of the downsized renditions | data.images.original data.images.downsized data.images.downsized_large data.images.downsized_medium data.images.downsized_small data.images.original data.images.fixed_height_small data.images.fixed_width_small data.images.fixed_width_downsampled data.images.fixed_height_downsampled |
Using RoD bundles for specific renditions If there is a specific rendition you know that you want in a given context, RoD filters allow you to filter out all but that specific rendition.
Example : only return stickers for a video editing app'https://api.giphy.com/v1/stickers/search?api_key={YOUR API KEY}&q=hello&bundle=sticker_layering'
Rendition Type | Title | Attribute | Available Filetypes |
---|---|---|---|
Original | original | Original file size and dimensions | GIF, MP4, WEBP |
original_still | A still version of the first frame of the original for previews and pre-loading. | GIF | |
looping | A version of the original set to loop for exactly 15 seconds. | MP4 | |
HD | hd | A high definition video that is available if the source media meets HD criteria. This video is constrained between 720 and 1920 pixels on a side. | MP4 |
4k | An ultra high definition video that is available if the source media meets 4K UHD criteria. This video is constrained between 2160 and 3840 pixels on a side. | MP4 | |
Fixed Height | fixed_height | Height set to 200px, variable width, to fit in preview grids and other smaller applications. | GIF, MP4, WEBP |
fixed_height_still | A still version of the first frame of the fixed_height rendition for previews and pre-loading. | GIF | |
fixed_height_downsampled | Downsampled to six frames for faster-loading unlimited scroll preview grids. Not for user selection. | GIF, WEBP | |
fixed_height_small | Height set to 100px, variable width. Good for smaller screen sizes with preview grids. | GIF, MP4, WEBP | |
fixed_height_small_still | A still version of the first frame of the fixed_height_small rendition for previews and pre-loading. | GIF | |
Fixed Width | fixed_width | Width set to 200px, variable height, to fit in preview grids and other smaller applications. | GIF, MP4, WEBP |
fixed_width_still | A still version of the first frame of the fixed_width rendition for previews and pre-loading. | GIF | |
fixed_width_downsampled | Downsampled to six frames for faster-loading unlimited scroll preview grids. Not for user selection. | GIF, WEBP | |
fixed_width_small | Width set to 100px, variable height. Good for smaller screen sizes with preview grids. | GIF, MP4, WEBP | |
fixed_width_small_still | A still version of the first frame of the fixed_width_small rendition for previews and pre-loading. | GIF | |
Downsized | downsized | Resized and downsampled to meet 2MB limit. | GIF |
downsized_still | A still version of the first frame of the downsized rendition for previews and pre-loading. | GIF | |
downsized_large | Resized and downsampled to meet 8MB limit. | GIF | |
downsized_medium | Resized and downsampled to meet 5MB limit. | GIF | |
downsized_small | Resized and downsampled to meet 200KB limit. | MP4 | |
Preview | preview | Resized and trimmed to meet 50kB limit. Not recommended for most use cases. | MP4 |
preview_gif | Resized and trimmed to meet 50kB limit. Not recommended for most use cases. | GIF |
GIPHY supports the following language codes for the lang
parameter in your API requests. Including this parameter helps GIPHY improve so we can deliver better, more relevant results for non-english searches.
GIFs are for everyone, and GIPHY is committed to making sure that its GIF search is a positive experience for everyone. We take content safety extremely seriously. Our GIF and Sticker library is thoroughly moderated and organized by rating in order to give GIPHY users the safest possible search experience. We do not hesitate to remove content that falls outside of our Community Guidelines.
Please contact support@giphy.com if you see any content that you feel is incorrectly rated or in violation of GIPHY’s Community Guidelines. Also, feel free to reach out if you have any general questions about content safety at GIPHY as well.