GIPHY provides a wide range of GIF Object renditions so that developers customize their UIs 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 all sorts of different ways. Have a novel use case and need some advice? Feel free to reach out: api@giphy.com
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.
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 languages and offers unique regional content for many of the areas where these languages are spoken. You can leverage these benefits by passing the lang
param in your API request.
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.