You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root cause (short): bb stores and serves pasted HEIC bytes verbatim as a localImage (content-type image/heic) and renders the URL in a plain ; Chromium (web + Electron) has no HEIC decoder and bb never transcodes, so the thumbnail/timeline image is broken — and the provider (Codex) cannot process the image either.
Proposed fix: Transcode HEIC/HEIF once at the server upload boundary in storeAttachment (apps/server/src/services/projects/attachments.ts): detect image/heic|heif (or .heic/.heif extension), decode with a WASM libheif package (heic-decode/heic-convert; sharp's prebuilt libvips lacks HEIC), store JPEG (PNG if alpha), return mimeType image/jpeg + new path/sizeBytes, enforce the 10MB limit on output, 400 on decode failure. No wire/protocol change needed. Also render an "unsupported image" tile on onError in AttachmentPreview/ConversationAttachments. Regression test = the repro vitest (upload real HEIC ->…
Caveats: Repro run on Linux headless Chromium 145 (same Blink decoders as Electron); macOS Safari would likely render HEIC natively (not tested, no Apple hardware). Claude Code Read-tool behavior with HEIC inferred from code, not run. Worktree was initially at origin/main a108fa7; I checked out 16ceb3a before the live repro and confirmed the relevant files are identical between the two. Repro test file…
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at 16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
recognizes HEIC/HEIF from normalized MIME type or .heic/.heif extension;
enforces the 10 MB image-input limit before decoding;
converts the primary image to quality-0.92 JPEG at the server boundary;
stores and returns a .jpglocalImage with image/jpeg metadata;
enforces the 10 MB limit again on converted output;
returns a stable 400 response for corrupt HEIC input;
updates CLI/guide documentation.
Verification
The changed regression test failed against the old implementation (expected 201, received 400) and passes after the change.
Real macOS-generated HEIC bytes upload through the public route and download as a valid 64×64 JPEG.
@bb/server and @bb/app typechecks pass.
Focused server tests: 4 passed.
Focused composer upload tests: 4 passed.
@bb/server production build passes.
The authenticated account hypersolid-schalk is not yet listed in .github/APPROVED_CONTRIBUTORS, so I am publishing the implementation as the requested prototype rather than bypassing the contributor gate. A maintainer approval would allow me to open the PR.
Activity
SawyerHood commentedon Aug 18, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1670.html
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at
16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).Reject HEIC/HEIF attachment uploads with a reason (#2170)
hypersolid-schalk commentedon Sep 14, 2026
Fresh reproduction and tested implementation against bb 0.43.1 and current
mainatb9fdeece5de171ea28c5f60566c596617f46ee88.Current behavior
Attaching a valid
image/heicfile returns HTTP 400:The rejection is currently enforced at the server upload boundary in
storeAttachment. JPEG and PNG uploads continue to work.Tested implementation
Prototype branch: https://github.com/hypersolid-schalk/bb/tree/fix/1670-heic-upload
Commit: hypersolid-schalk@f973a8c
The implementation:
.heic/.heifextension;.jpglocalImagewithimage/jpegmetadata;Verification
expected 201, received 400) and passes after the change.@bb/serverand@bb/apptypechecks pass.@bb/serverproduction build passes.The authenticated account
hypersolid-schalkis not yet listed in.github/APPROVED_CONTRIBUTORS, so I am publishing the implementation as the requested prototype rather than bypassing the contributor gate. A maintainer approval would allow me to open the PR.Convert HEIC attachments to PNG in an isolated worker
Convert HEIC attachments to PNG in an isolated worker
Add Image Convert: HEIC, AVIF, TIFF and BMP attachments as JPEG/PNG (#6)