Best Practices
Best Practices for Renditions
- For the vast majority of GIPHY integrations, we recommend using MP4 for gifs and WEBP for stickers, which provides high image quality for relatively small file sizes, and is supported on all major platforms and web browsers. For more information, see our Rendition Guide.
- Every GIF returned by the Trending and Search endpoints contains an images object with Media URLs (url field). The images object returns multiple renditions.
- We provide various renditions of each GIF in the images object to give your users the best experience possible. Generally, it’s best to use the smaller fixed_height or fixed_width renditions on your preview grid.
- Once a user has selected a GIF, present a higher resolution rendition.
- If you have bandwidth limitations consider using downsized_small(max 200kB), downsized (max 2MB), downsized_medium(max 5MB) renditions.
- Refer to our Rendition Guide for more information on what rendition is best suited for each use-case.
Prohibited Integration Practices
- Do not strip or modify URLs returned by the API. In particular, do not remove or modify query params in our media URLs while rendering the media assets.
- Do not cache media URLs or copies of GIPHY media assets unless your integration has been explicitly approved by GIPHY for media caching and follows GIPHY's required cache revalidation implementation.
- Do not proxy requests to GIPHY, either API calls or media URL loads. All requests to GIPHY should be made directly from the client side (e.g. your app or web browser).
- Do not reorder content or filter out our content returned from GIPHY's search of trending API responses.
- Do not mix GIPHY's content with content from other providers in the same grid.
Caching Requirements for Approved Integrations
For standard integrations, GIPHY media should be loaded directly from the media URLs returned by the API and should not be cached, proxied, rewritten, or stored by the partner.
In some approved high-scale integrations, GIPHY may allow a partner-operated caching layer for media delivery. This is handled as an exception to standard integration requirements and requires prior written approval from GIPHY.
Partners should not implement media caching independently. If your integration requires a custom caching layer, contact your GIPHY partner representative for approval and implementation guidance.
Approved caching implementations must follow GIPHY's required cache revalidation pattern before cached media is served to end users. This helps ensure that removed, expired, or restricted content is not served to end users.
Example implementations for Fastly and Cloudflare are available here: