openclaw - 💡(How to fix) Fix [Bug] image_generate MEDIA paths not delivered to Telegram chat [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#76988Fetched 2026-05-04 04:59:42
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
2
Author
Timeline (top)
commented ×1

Fix Action

Fix / Workaround

Tested Workaround

Calling the Telegram Bot API directly via Python/urllib works perfectly. The issue is in OpenClaw's media delivery layer, not the Telegram API or bot token.

Code Example

# Send photo via Bot API -> ✅ returns message_id
RAW_BUFFERClick to expand / collapse

Bug Description

image_generate tool successfully generates images and returns valid MEDIA:/path/... paths, but the generated images are NOT delivered to Telegram chats. Text responses work fine. Direct Telegram Bot API calls successfully send photos.

Environment

  • OpenClaw: 2026.5.2 (8b2a6e5)
  • Channel: Telegram (both default and lydia accounts)
  • Install: global npm package under /usr/lib/node_modules/openclaw
  • Node: v22.22.2
  • OS: Linux (Hostinger VPS)

Observed Behavior

  1. image_generate returns MEDIA:/root/.openclaw/media/tool-image-generation/image-1---xxx.png
  2. File exists: ls -la confirms valid PNG files (200KB-2MB)
  3. Direct Telegram API calls (curl/Python) successfully send these same images to the same chat
  4. OpenClaw gateway does NOT send the images to Telegram
  5. Text responses are delivered correctly

Evidence

Direct API call works perfectly:

# Send photo via Bot API -> ✅ returns message_id

Tested Workaround

Calling the Telegram Bot API directly via Python/urllib works perfectly. The issue is in OpenClaw's media delivery layer, not the Telegram API or bot token.

Possible Related Issues

  • #75683 (image_generate output not accessible from sandbox workspace)
  • #75166 (image/video provider inventory leaks - fixed in #75550)
  • The media delivery path for generated images vs user-uploaded files may have diverged

Expected

Generated images should appear in Telegram chat alongside or instead of the MEDIA: path text.

Suggested Investigation

Check if the media delivery path for Telegram attachments has changed in 2026.5.x, or if there is a regression in the sendPhoto handling for generated tool outputs vs user-uploaded files. The delivery may be silently failing or the MEDIA path may not be getting converted to a file handle correctly.

extent analysis

TL;DR

The issue is likely due to a regression in OpenClaw's media delivery layer, specifically in handling generated images, and can be temporarily worked around by using the Telegram Bot API directly.

Guidance

  • Investigate the media delivery path for Telegram attachments in OpenClaw version 2026.5.x to identify any changes that may be causing the issue.
  • Check the sendPhoto handling for generated tool outputs vs user-uploaded files to ensure that the MEDIA path is being converted to a file handle correctly.
  • Verify that the image_generate tool is correctly generating images and that the files exist at the specified paths.
  • Consider testing with a previous version of OpenClaw to determine if the issue is specific to version 2026.5.2.

Example

No code example is provided as the issue is more related to the configuration and functionality of OpenClaw rather than a specific code snippet.

Notes

The issue seems to be specific to the OpenClaw media delivery layer and not with the Telegram API or bot token. The fact that direct Telegram API calls work perfectly suggests that the issue is with OpenClaw's handling of generated images.

Recommendation

Apply workaround: Use the Telegram Bot API directly to send generated images until the issue is resolved in OpenClaw, as it has been confirmed to work correctly.

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

openclaw - 💡(How to fix) Fix [Bug] image_generate MEDIA paths not delivered to Telegram chat [1 comments, 2 participants]