[FEATURE] Auto-convert HEIC/HEIF attachments to JPEG instead of rejecting them (VS Code extension)
Problem
iPhone photos default to HEIC. Dragging one into the Claude Code panel in VS Code shows:
Unsupported file type: IMG_XXXX.HEIC. Supported types: images (PNG, JPG, GIF, WebP), text files, and PDFs.
For anyone whose photos come from an iPhone — i.e., most Mac users — this is constant
friction: every photo needs a manual conversion step before Claude can see it.
Why the current rejection exists (and why this request is different)
The webview's allowlist (image/jpeg, image/png, image/gif, image/webp) mirrors
what the Messages API accepts, and #57323 showed what happens when HEIC bytes sneak
past the sniff: a 400 that poisons session history. So rejecting HEIC as-is is
correct — this request is not "allowlist HEIC," it's transcode it client-side
before it enters the message.
Proposed solution
When an attached/pasted file is HEIC/HEIF, convert to JPEG before building theimage content block:
- macOS (the platform where HEIC actually occurs): the extension host can shell
out to the built-in sips -s format jpeg <file> — zero new dependencies,
milliseconds per photo. The webview can't do it itself (Chromium has no HEIC
decoder), but it already talks to the extension host, which has fs/process access.
- Cross-platform fallback (optional): a wasm decoder (e.g. libheif) in the
extension host.
- During transcode, bake in EXIF orientation — #22598 reports HEIC-converted JPEGs
rendering upside down, so orientation handling should ship with this.
Workaround today (for others who land here)
Don't attach the file — mention its path (or just its filename) in the prompt and let
Claude convert it with sips and Read the JPEG. Works reliably, but drag-and-drop is
the natural gesture, and the error text sends users hunting for converters instead.
Environment
- Claude Code VS Code extension v2.1.206 (darwin-arm64), macOS 26, Apple Silicon
- Related: #57323 (closed — HEIC mis-sniff → 400 + history poisoning; this is the
proper-support follow-up), #22598 (orientation)