Invalid Image Media Type in Base64 Encoding

Resolved 💬 3 comments Opened Jun 22, 2025 by cfleeac Closed Aug 21, 2025

Bug Description
Read(public/icons/icon-144x144.png)
⎿  Read image (3.2KB)
⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.8.content.0.tool_result.content.0.image.source.base64.media_type: Input should be 'image/jpeg', 'image/png',
'image/gif' or 'image/webp'"}}\

Environment Info

  • Platform: darwin
  • Terminal: kitty
  • Version: 1.0.31
  • Feedback ID: cbb2e8e1-881b-4bca-b978-42035008856d

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at NZ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:700:3921)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:9014\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n    at GX (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:8160)\n    at fS (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:7241)\n    at R9 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:11408)","timestamp":"2025-06-22T07:30:23.476Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.8.content.0.tool_result.content.0.image.source.base64.media_type: Input should be 'image/jpeg', 'image/png', 'image/gif' or 'image/webp'\"}}\n    at d6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1302:12578)\n    at yw.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:2082)\n    at yw.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:5257)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async N11.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1959:18554)\n    at async N11 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1492:703)\n    at async pU2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1959:18400)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1959:13529\n    at async Oe1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1959:4695)\n    at async Wu (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1959:13499)","timestamp":"2025-06-22T07:30:50.075Z"}]

View original on GitHub ↗

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