renderAttachments() decided whether to render an image thumbnail by regex-matching the display filename extension, rather than the finfo-verified mime_type the API already returns. A file whose real type differs from its display name (e.g. a PDF a user named photo.png) rendered a broken <img> instead of falling back to the file-type icon. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MGDKHiU5RJdo3dqQUDow3X