claude-code - 💡(How to fix) Fix Read tool rejects valid PNG images with "(media removed — rejected by API)" [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
anthropics/claude-code#60703Fetched 2026-05-20 03:51:41
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

The Read tool fails to display valid PNG images, returning (media removed — rejected by API) instead of rendering them. This appears to be a regression — the same issue was encountered in a previous session.

Error Message

  1. Resizing the image (e.g. 50%) and retrying also fails with the same error.

Root Cause

The Read tool fails to display valid PNG images, returning (media removed — rejected by API) instead of rendering them. This appears to be a regression — the same issue was encountered in a previous session.

Code Example

$ pngfix screenshot.png
   IDAT OK  default 15 15 17249 1090740 screenshot.png

   $ identify screenshot.png
   screenshot.png PNG 1286x212 1286x212+0+0 8-bit sRGB 17452B 0.000u 0:00.000

---

Read({ file_path: "/path/to/screenshot.png" })
RAW_BUFFERClick to expand / collapse

Description

The Read tool fails to display valid PNG images, returning (media removed — rejected by API) instead of rendering them. This appears to be a regression — the same issue was encountered in a previous session.

Reproduction

  1. Have a valid PNG file on disk (confirmed valid via pngfix and identify):

    $ pngfix screenshot.png
    IDAT OK  default 15 15 17249 1090740 screenshot.png
    
    $ identify screenshot.png
    screenshot.png PNG 1286x212 1286x212+0+0 8-bit sRGB 17452B 0.000u 0:00.000
  2. Use the Read tool to view the file:

    Read({ file_path: "/path/to/screenshot.png" })
  3. Result: (media removed — rejected by API)

  4. Resizing the image (e.g. 50%) and retrying also fails with the same error.

Expected behavior

The Read tool should display the PNG image inline, as documented ("This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.").

Environment

  • Platform: Linux (Arch, kernel 7.0.3)
  • Model: claude-opus-4-6
  • Version: 2.1.145
  • Image: 1286x212, 8-bit RGBA, non-interlaced, ~17 KB
  • The PNG passes validation (pngfix reports OK)

Notes

This is the second time this issue has occurred, suggesting a regression in the image handling pipeline between the Read tool and the API.

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

The Read tool should display the PNG image inline, as documented ("This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.").

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Read tool rejects valid PNG images with "(media removed — rejected by API)" [1 comments, 2 participants]