Repository navigation
[Bug]: SVG image attachments are rejected by T3 Code #10936
Description
Activity
- addedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Sep 9, 2026 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 underimage/*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 withUnsupported 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
- Reopening [Bug]: SVG images cannot be pasted into chat, they are accepted and show up as images in chat but a separate error shows "Unsupported Claude image attachment type 'image/svg+xml'. " #6020 or treating this as a regression
- Sending SVG as a vision image (that is the [Bug]: SVG images cannot be pasted into chat, they are accepted and show up as images in chat but a separate error shows "Unsupported Claude image attachment type 'image/svg+xml'. " #6020 failure mode)
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.- addedenhancementRequested improvement or new capability.Requested improvement or new capability.via-triageFiled through npx t3 triageFiled through npx t3 triageand removedbugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.Issue needs maintainer review and initial categorization.
on Sep 9, 2026
Before submitting
Area
apps/web
Steps to reproduce
Expected behavior
It should attach the SVG as an attachment.
Actual behavior
The composer refuses the SVG with an error message
Impact
Major degradation or frequent failure
Version or commit
0.0.41-nightly.20260908.1400
Environment
Windows 11
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
A workaround is to rename the extension to txt or html or something.