Read tool rejects valid PNG images with "(media removed — rejected by API)"

Resolved 💬 2 comments Opened May 19, 2026 by socketbox Closed May 20, 2026

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
```

  1. Use the Read tool to view the file:

``
Read({ file_path: "/path/to/screenshot.png" })
``

  1. Result: (media removed — rejected by API)
  1. 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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗