📚 Encyclopedia

Web Development · updated 2026-10-13

GIF search behind a server proxy (Tenor shutdown, GIPHY, MMS size budgets)

gifgiphytenorapi-proxyphpmmsrate-limiting

Google discontinued the Tenor API for all third parties on 2026-06-30; every request returns 403. (Discord moved to Klipy; WhatsApp and Signal to GIPHY.) The Message SMS app's GIF picker broke the same week, and correct client fixes made that week were not the cause: the upstream had died. The durable fix was to put the provider behind Justin's own API so the app never talks to a GIF vendor directly.

Architecture

Picking a rendition that fits MMS

Carrier MMS caps at about 1 MB, and GIPHY's "downsized" rendition only guarantees 2 MB or less. A 1.9 MB GIF failed with resultCode=5. The server picks the best-quality rendition whose declared size fits a 900 KB budget, walking downsized, then fixed_height/fixed_width, then downsampled, then preview_gif, falling back to the smallest. Measured afterward: 45 of 45 full GIFs at or under 844 KB. The app keeps a hard 1 MB cap with a friendly error as a backstop.

Client-side lessons

See also

Linked from

Sources: message memory (project_gif_pipeline, project_sms_app v2.9.8 to v2.13.0)