/** * Ensure a DiceBear avatar URL uses PNG format for React Native compatibility. * React Native's Image component cannot render SVGs. * This converts at render time only — the stored URL in the DB is never modified. */ export function ensurePngAvatar(url: string | null | undefined): string | undefined { if (!url) return undefined; return url.replace('/svg?', '/png?'); }