Tour the Atmosphere. Switch clients, share universal links, browse any PDS.
Something went wrong. Try again.
fix(og): handle webp avatars from bsky cdn in image routes master
The @vercel/og base64 data-URI decoder only supports png/apng/jpeg/gif/svg. cdn.bsky.app now serves avatars and thumbnails as image/webp, which made the decoder fall through its switch without setting a size, and then throw "TypeError: l is not iterable" when spreading undefined. Introduce a shared fetchImageAsDataUrl helper that: - rewrites cdn.bsky.app URLs with an @jpeg suffix so we always get jpeg - skips (with a warning) any response with an unsupported content-type instead of letting it crash the whole OG render - keeps the existing 3s timeout behavior Used by the post, profile, and list OG routes. Co-authored-by: dame <dame-is@users.noreply.github.com>
Author Cursor Agent Co-author dame Date (Apr 22, 2026, 6:18 PM UTC) Commit c4c127a2 c4c127a2e57704b9af467ce3aedf89012c190712 Parent 0ea53c16 0ea53c1646e1ce0e43c0f48d41a0ea43da5590a5