[Bug]: SVG image attachments are rejected by T3 Code #10936
CPRewrite(GitHub profile, opens in a new tab) added labelsbug
CPRewrite(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge added labelsenhancement
juliusmarminge removed labelsbug
juliusmarminge removed labelsneeds-triage
juliusmarminge added labelsvia-triage
juliusmarminge added labelsneeds-julius
Sign in to join this conversation.
Thanks for the report — this is working as designed after the #6020 fix, but the design-file request is a reasonable follow-up (not a wash duplicate).
What happens today The composer classifies anything under
image/*that providers cannot take as a vision image asunsupported-imageand refuses it at attach time. SVG (image/svg+xml) is in that bucket, along with TIFF.That check lives in
apps/web/src/components/chat/composerAttachmentFiles.ts/ChatComposer.tsx, backed byPROVIDER_SEND_TURN_SUPPORTED_IMAGE_MIME_TYPESinpackages/contracts(GIF, JPEG, PNG, WebP). HEIC/HEIF are a special convert-to-raster path. Mobile uses the same rule.Why it exists #6020 accepted SVG, then Claude failed with
Unsupported Claude image attachment type 'image/svg+xml'. #6574 / 93376e45 moved that failure to attach time on purpose. Tests still say “reject unsupported image types instead of attaching them as generic files.”What you want Attaching SVG source for designs is a different path. The server already accepts
{ type: "file", mimeType: "image/svg+xml" }as a generic file, and Claude/OpenCode only send raster types as vision — other files ride as a prompt path. Your rename-to-.txt/.htmlworkaround works because that skips theimage/*reject and uses the file path.Not doing
Next Product call (@julius) on whether to keep the hard reject or add an SVG exception that stages it as a generic file (not an image). Rasterizing to PNG would not preserve design source. Served-SVG XSS is already sandboxed (#5916).
Until then, attach via rename, or put the
.svgin the workspace and mention the path.