openclaw - 💡(How to fix) Fix [Bug] iOS: large chat image attachments fail or blow up memory (48MP frames, no client-side resize) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68524Fetched 2026-04-19 15:10:39
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

This was partially prototyped locally in the branch anker3/image-resize-chat-attachments (not yet upstreamed):

  • 9 commits
  • 22 tests
  • 4 adversarial review rounds (8/8 pass)
  • Fixes: 48MP decode stack overflow, base64 off MainActor, progressive resize to 3.5 MB budget

Related but distinct:

  • #61041 — Feature Request: Auto-resize images exceeding 5MB limit (general)
  • #59913 — OpenAI compat gateway images bypass sanitization/resize
  • #53924 — tool-images resizer bypassed on context replay
  • #33179 — Control UI reprocesses historical images on session:history
  • #60339 — gateway offloadedRefs metadata lost in iOS share/node path

This issue is specifically about the iOS client composer resizing before transport, not server-side resize.

Root Cause

This was partially prototyped locally in the branch anker3/image-resize-chat-attachments (not yet upstreamed):

  • 9 commits
  • 22 tests
  • 4 adversarial review rounds (8/8 pass)
  • Fixes: 48MP decode stack overflow, base64 off MainActor, progressive resize to 3.5 MB budget

Related but distinct:

  • #61041 — Feature Request: Auto-resize images exceeding 5MB limit (general)
  • #59913 — OpenAI compat gateway images bypass sanitization/resize
  • #53924 — tool-images resizer bypassed on context replay
  • #33179 — Control UI reprocesses historical images on session:history
  • #60339 — gateway offloadedRefs metadata lost in iOS share/node path

This issue is specifically about the iOS client composer resizing before transport, not server-side resize.

RAW_BUFFERClick to expand / collapse

Problem

Attaching multiple photos from the iOS app's chat composer — particularly modern iPhone 48MP photos — causes one or more of:

  • Attachments silently fail to deliver
  • Memory pressure during base64 encoding on the MainActor
  • Per-attachment payload exceeds gateway/model limits (typical ceiling ~5 MB)
  • Stack overflows during image decode when multiple full-resolution assets are loaded at once

Tested on iPhone 16 Pro Max (iOS 26.3.1) against gateway 2026.4.15 over WAN WebSocket. Multi-image send in a single message reliably degrades the experience.

Expected

iOS client resizes/compresses attachments before transport:

  • Progressive resize to a budget (e.g. 3.5 MB per image) targeting Anthropic's 5 MB limit with headroom
  • Decode + resize off MainActor
  • Aspect-ratio preserving
  • Pixel-count cap to avoid 48MP decode bombs
  • Per-message total budget across N attachments

Context

This was partially prototyped locally in the branch anker3/image-resize-chat-attachments (not yet upstreamed):

  • 9 commits
  • 22 tests
  • 4 adversarial review rounds (8/8 pass)
  • Fixes: 48MP decode stack overflow, base64 off MainActor, progressive resize to 3.5 MB budget

Related but distinct:

  • #61041 — Feature Request: Auto-resize images exceeding 5MB limit (general)
  • #59913 — OpenAI compat gateway images bypass sanitization/resize
  • #53924 — tool-images resizer bypassed on context replay
  • #33179 — Control UI reprocesses historical images on session:history
  • #60339 — gateway offloadedRefs metadata lost in iOS share/node path

This issue is specifically about the iOS client composer resizing before transport, not server-side resize.

Repro

  1. Open iOS app, Control UI or node mode
  2. Attach 3–6 recent Camera Roll photos (HEIC/JPEG, default iPhone capture)
  3. Send
  4. Observe partial failure, memory spike, or payload rejection

Proposed fix

Upstream the prototype from anker3/image-resize-chat-attachments. If desired I can prep a PR with the 9-commit stack rebased onto current main.

extent analysis

TL;DR

Upstreaming the prototype from anker3/image-resize-chat-attachments is likely to fix the issue of attaching multiple photos from the iOS app's chat composer causing silent failures, memory pressure, or payload rejections.

Guidance

  • Review the 9 commits in the anker3/image-resize-chat-attachments branch to understand the proposed fix and its components, such as progressive resize, off-MainActor decoding, and aspect-ratio preservation.
  • Verify that the prototype's 22 tests cover all relevant scenarios, including different image sizes, formats, and attachment counts.
  • Consider rebasing the prototype onto the current main branch to ensure compatibility and minimize potential conflicts.
  • Test the upstreamed fix with various iPhone models and iOS versions to ensure the solution is robust and reliable.

Example

No code snippet is provided as the issue does not contain explicit code references, and generating code may introduce inaccuracies.

Notes

The proposed fix focuses on the iOS client composer resizing images before transport, which is a distinct solution from server-side resizing. The upstreamed prototype should be thoroughly reviewed and tested to ensure it addresses the specific issues mentioned in the problem statement.

Recommendation

Apply the workaround by upstreaming the prototype from anker3/image-resize-chat-attachments, as it has already been partially prototyped and tested, and it addresses the specific issues with attaching multiple photos from the iOS app's chat composer.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING