openclaw - ✅(Solved) Fix [Bug]: WhatsApp image sending broken - images processed but not attached to outbound messages [1 pull requests, 1 comments, 2 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#81322Fetched 2026-05-14 03:33:24
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Author
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

When sending images via WhatsApp channel, images are processed (resized using sharp works and is logged) but are NOT attached to outbound messages. Outbound logs always show hasMedia: false for these images.

Root Cause

When sending images via WhatsApp channel, images are processed (resized using sharp works and is logged) but are NOT attached to outbound messages. Outbound logs always show hasMedia: false for these images.

Fix Action

Fixed

PR fix notes

PR #81415: fix(agents): attach read tool images to replies

Description (problem / solution / changelog)

Summary

  • Persist trusted read tool image content into the inbound media store when the tool result has image blocks but no MEDIA: path or details.path.
  • Queue the saved media://inbound/... reference for the next assistant reply so shared outbound delivery, including WhatsApp, receives media URLs instead of text-only replies.
  • Add regression coverage for the read-tool image bridge.

Fixes #81322

Real behavior proof

  • Behavior or issue addressed: A read tool image result is saved as inbound media and queued for outbound replies instead of being dropped as text-only output.
  • Real environment tested: Local OpenClaw checkout on Windows, Node v24.15.0, with OPENCLAW_STATE_DIR pointed at a temporary state directory and the real handler/media-store modules loaded.
  • Exact steps or command run after this patch: Ran pnpm exec tsx - with a script that imports handleToolExecutionEnd, feeds a read tool result containing a PNG image content block, then reads the saved inbound media back from the media store.
  • Evidence after fix: Terminal output from the after-fix run:
{
  "pendingToolMediaUrls": [
    "media://inbound/836ee240-d174-41fc-9be0-28dc88ef4839.png"
  ],
  "pendingToolTrustedLocalMedia": true,
  "savedSize": 68,
  "savedFileExists": true
}
  • Observed result after fix: The real handler persisted the image bytes, queued a media://inbound/...png URL, marked the media as trusted local media, and the saved file existed on disk.
  • What was not tested: Live WhatsApp device delivery; the verified behavior is the OpenClaw bridge that supplies media URLs to outbound delivery.

Verification

  • pnpm test src/agents/pi-embedded-subscribe.tools.media.test.ts src/agents/pi-embedded-subscribe.handlers.tools.media.test.ts src/agents/pi-embedded-subscribe.handlers.messages.test.ts extensions/whatsapp/src/outbound-payload.contract.test.ts extensions/whatsapp/src/outbound-adapter.sendpayload.test.ts extensions/whatsapp/src/auto-reply/deliver-reply.test.ts
  • pnpm check:test-types
  • pnpm check:changed

Changed files

  • src/agents/pi-embedded-subscribe.handlers.tools.media.test.ts (modified, +43/-0)
  • src/agents/pi-embedded-subscribe.handlers.tools.ts (modified, +12/-1)
  • src/agents/pi-embedded-subscribe.tools.ts (modified, +66/-0)

Code Example

"Image resized from 285.9KB to 197.3KB"
"hasMedia":false  // on outbound
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When sending images via WhatsApp channel, images are processed (resized using sharp works and is logged) but are NOT attached to outbound messages. Outbound logs always show hasMedia: false for these images.

Steps to reproduce

  1. Read an image file using the read tool
  2. Send a reply - text is sent but image is NOT attached
  3. Check logs: "hasMedia": false on outbound message, even after image resize.

Expected behavior

Images should be seen attached and delivered in the outbound WhatsApp message after successful processing, matching the previous functional behavior.

Actual behavior

No image is attached to the outbound WhatsApp message, even though processing (resize with sharp) completes successfully. Only the text is sent; logs show hasMedia: false. See log snippet below.

"Image resized from 285.9KB to 197.3KB" "hasMedia":false // on outbound

OpenClaw version

OpenClaw 2026.5.7

Operating system

zorin 17.3

Install method

sharp installed globally; WhatsApp channel enabled

Model

minimax 2.5

Provider / routing chain

openclaw -> ollama -> minimax-m2.5:cloud

Additional provider/model setup details

WhatsApp channel enabled; sharp installed globally.

Logs, screenshots, and evidence

"Image resized from 285.9KB to 197.3KB"
"hasMedia":false  // on outbound

Impact and severity

WhatsApp images cannot be sent. Affects all WhatsApp users on OpenClaw 2026.5.7. Consequence: cannot transmit media through WhatsApp. Frequency: 100% for processed image sends. Severity: high for WhatsApp users reliant on media.

Additional information

Observed after updating to OpenClaw 2026.5.7. Regression status unknown (first observed on this version).

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…

FAQ

Expected behavior

Images should be seen attached and delivered in the outbound WhatsApp message after successful processing, matching the previous functional behavior.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: WhatsApp image sending broken - images processed but not attached to outbound messages [1 pull requests, 1 comments, 2 participants]