[BUG] Image does not match the provided media type image/png

Resolved 💬 3 comments Opened May 7, 2025 by 0anton Closed May 30, 2025

!Image

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [x] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 0.2.103 (Claude Code)
  • Operating System: Ubuntu 22.04 under WSL2 (Windows 11)
  • Terminal: Windows Terminal 1.23.11132.0 (Preview)

Bug Description

Claude Code fails to process image provided in the prompt.

Steps to Reproduce

  1. Paste path to the Claude Code prompt
  2. Hit Enter

Expected Behavior

Image is successfully processed.

Actual Behavior

Claude code fails to process the image.

Additional Context

Tried png and jpg screenshots. Both are normal images made by screenshot capture tool on Windows.
Using Claude Code in WSL2 environment.

Example of paths:
/mnt/c/Users/user/OneDrive/X_Big_Exchange/Screenshots/Screenshot 2025-05-07 132315.png
/mnt/c/Users/user/OneDrive/X_Big_Exchange/Screenshots/ScreenShot446.jpg

Ideas, workarounds?

Error text:

> analyze image [Image #2]
  ⎿ API Error: 400
    {"type":"error","error":{"type":"invalid_request_error","message":"messages.2.content.0.image.source.base64.data: Image does
    not match the provided media type image/png"}}

View original on GitHub ↗

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