Giphy GIFs: Any way to filter search results by file size?

Currently in our forum we have a 4MB upload size limitation.
Occasionally Giphy returns GIFs which exceed that limit.

Is there any way to prevent that and maybe filter the search to exclude GIFs which exceed the configured max upload size in site settings?

2 Likes

Thanks for the suggestion! I’ve just added a setting, giphy_size_variant that will let you use giphy’s downsized variants… their API provides 5MB, 2MB or 200kB versions (more details from their end on Docs | GIPHY Developers)

This doesn’t filter the gifs returned based on Discourse’s image size setting, which can be a bit complicated (have to process every result, could end up with 0 results, complicates loading more on scroll, etc) — but will make it easier to have some control over the filesize.

3 Likes