[Bug] Anthropic API Error: Image media type mismatch on image files

Resolved 💬 6 comments Opened Dec 3, 2025 by janss-en Closed Mar 2, 2026

Bug Description
Getting this error when Claude attempts to read a basic .jpg image:

⏺ Read(temp/article-sessions/issue-82/images/
raw/PFH18HSPVMC_06.jpg)
⎿  Read image (230.4KB)
⎿ API Error: 400
{"type":"error","error":{"type":"invalid_
request_error","message":"messages.3.cont
ent.21.image.source.base64.data: Image
does not match the provided media type
image/jpeg"},"request_id":"req_011CVjEtb4
8ua18B11gWXgjQ"}

Environment Info

  • Platform: darwin
  • Terminal: WarpTerminal
  • Version: 2.0.56
  • Feedback ID: c06922b7-4a23-47f7-bd79-73f5593749f8

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/j/.local/share/claude/versions/2.0.56 (expected in multi-process scenarios)\n    at kN0 (/$bunfs/root/claude:2678:1622)\n    at ICA (/$bunfs/root/claude:2676:35354)\n    at async FD7 (/$bunfs/root/claude:2676:37462)\n    at async vx (/$bunfs/root/claude:2678:236)\n    at async <anonymous> (/$bunfs/root/claude:2678:12981)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-03T05:11:12.437Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readFileSync (unknown)\n    at readFileSync (/$bunfs/root/claude:12:370)\n    at jrB (/$bunfs/root/claude:4281:17119)\n    at call (/$bunfs/root/claude:1434:912)\n    at call (/$bunfs/root/claude:1430:5711)\n    at xA7 (/$bunfs/root/claude:2237:16379)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-03T05:12:13.898Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readFileSync (unknown)\n    at readFileSync (/$bunfs/root/claude:12:370)\n    at jrB (/$bunfs/root/claude:4281:17119)\n    at call (/$bunfs/root/claude:1434:912)\n    at call (/$bunfs/root/claude:1430:5711)\n    at xA7 (/$bunfs/root/claude:2237:16379)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-03T05:24:16.877Z"},{"error":"Error: Request was aborted.\n    at _createMessage (/$bunfs/root/claude:419:3151)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-03T05:27:13.251Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at readFileSync (unknown)\n    at readFileSync (/$bunfs/root/claude:12:370)\n    at jrB (/$bunfs/root/claude:4281:17119)\n    at call (/$bunfs/root/claude:1434:912)\n    at call (/$bunfs/root/claude:1430:5711)\n    at xA7 (/$bunfs/root/claude:2237:16379)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-03T05:37:29.661Z"},{"error":"Error: Could not load the \"sharp\" module using the darwin-arm64 runtime\nPossible solutions:\n- Ensure optional dependencies can be installed:\n    npm install --include=optional sharp\n- Ensure your package manager supports multi-platform installation:\n    See https://sharp.pixelplumbing.com/install#cross-platform\n- Add platform-specific dependencies:\n    npm install --os=darwin --cpu=arm64 sharp\n- Consult the installation documentation:\n    See https://sharp.pixelplumbing.com/install\n    at <anonymous> (/$bunfs/root/claude:864:17571)\n    at <anonymous> (/$bunfs/root/claude:11:356)\n    at <anonymous> (/$bunfs/root/claude:865:88)\n    at <anonymous> (/$bunfs/root/claude:11:356)\n    at <anonymous> (/$bunfs/root/claude:865:79804)\n    at <anonymous> (/$bunfs/root/claude:11:356)\n    at <anonymous> (/$bunfs/root/claude:865:79980)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-03T05:42:15.974Z"},{"error":"TypeError: (B.default||B) is not a function. (In '(B.default||B)(R)', '(B.default||B)' is an instance of Object)\n    at yGR (/$bunfs/root/claude:865:80003)\n    at async tE8 (/$bunfs/root/claude:1425:11601)\n    at async b9A (/$bunfs/root/claude:1425:11819)\n    at async call (/$bunfs/root/claude:1434:389)\n    at async xA7 (/$bunfs/root/claude:2237:16379)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-03T05:42:15.974Z"},{"error":"TypeError: (B.default||B) is not a function. (In '(B.default||B)(R)', '(B.default||B)' is an instance of Object)\n    at yGR (/$bunfs/root/claude:865:80003)\n    at async tE8 (/$bunfs/root/claude:1425:11601)\n    at async b9A (/$bunfs/root/claude:1425:11819)\n    at async call (/$bunfs/root/claude:1434:389)\n    at async xA7 (/$bunfs/root/claude:2237:16379)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-03T05:42:15.974Z"},{"error":"TypeError: (B.default||B) is not a function. (In '(B.default||B)(R)', '(B.default||B)' is an instance of Object)\n    at yGR (/$bunfs/root/claude:865:80003)\n    at async tE8 (/$bunfs/root/claude:1425:11601)\n    at async b9A (/$bunfs/root/claude:1425:11819)\n    at async call (/$bunfs/root/claude

Note: Error logs were truncated.

View original on GitHub ↗

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