ThinkFacility

Error messages

Could not process image

The message

Could not process image
Claude Code 2.1.282 read September 25, 2026Claude Codeimages400

What it means

Anthropic's API refused an image in your conversation, either because it's too big or because it couldn't decode it. The image is still in your history, which is why the error can come back.

What to do

Press Esc twice and step back to before the turn that added the image, or /clear. Then resize it, or re-save it as a plain PNG or JPEG, before trying again.

Both of these come from Anthropic's API rather than from Claude Code. The API received an image in your conversation and sent back a 400, the status for a request it won't accept. One version says it couldn't decode the picture:

Could not process image

and the other says it was too big, with a path to the offending image and the byte count in the raw text:

messages.0.content.5.image.source.base64: image exceeds 5 MB maximum: 5281812 bytes > 5242880 bytes

As of September 25, 2026, 168 issues in the anthropics/claude-code repo quote the first line and 165 quote "image exceeds". They're one page here because Claude Code handles them in the same code path and they're fixed the same way. We read the 2.1.282 binary, Anthropic's vision docs and the issue reports.

What Claude Code prints for each one

Claude Code rarely shows the raw API text. It reads the message and swaps in its own line. A size rejection becomes:

Image was too large. Double press esc to go back and try again with a smaller image.

An image the API couldn't process (the error names an image inside a particular message) becomes:

API Error: an image in the conversation could not be processed and was removed. Double press esc to edit your message, or re-read the file if you still need it.

And there's a third one for pixel dimensions, which says the conversation has so many images that a stricter limit kicked in (more on that below). In print mode and the SDK the endings change to "Try resizing the image or using a different approach" and "Re-read the file with a different approach", which is the version many issues quote.

The actual limits

Anthropic's vision docs, read today, give these:

The size limit is measured after base64 encoding, which inflates a file by about a third. That's why a 4 MB screenshot can blow a 5 MB limit. Older images count toward the 20, so a conversation full of big screenshots can start failing on the request where you add a small new one.

Claude Code tries to stop you reaching any of this. The 2.1.282 binary resizes images to fit 2000 by 2000 pixels and 5 MB before sending, and only raises the size target to 10 MB for direct API users behind a flag Anthropic switches on from its side. When the local resize itself fails you see Unable to resize image instead, with a reason, such as a CMYK JPEG it can't decode.

Why the error keeps coming back

This is the part that costs people money. The image doesn't leave your conversation when the request fails. Anthropic's error reference says Claude Code "replaces the unprocessable image with a text placeholder and retries", and the binary does rebuild each outgoing request with the image swapped out. The rebuild happens on every request, though. One reporter in #90363 (open, August 28) found the image still sitting in the saved session file, and argues the constant rebuilding breaks the prompt cache, so each turn is billed at the full rate. Others describe the "was removed" line repeating turn after turn until the usage limit runs out (#66278 was a QR code).

I couldn't confirm the billing figures in #90363 from the code. But the advice lines up with the product's own message: don't keep typing into that session.

Getting a stuck session back

Press Esc twice, which is what the message itself says, and step back to a point before the turn that added the image; /rewind does the same from a command. That drops the image from the history for real. If you don't need the conversation, /clear is quicker. For the many-image version, /compact also works, since it clears old images out of the context, and the product suggests it directly.

Then fix the image before sending it again. For a size rejection, crop to the part that matters or resize under 2000 pixels on the long side (a tighter screenshot usually beats a full-screen one anyway). For "Could not process image", Anthropic doesn't say which images trigger it, so re-save the file as an ordinary PNG or JPEG; that gets rid of odd encodings, and it's what Claude Code's own resize errors tell you to do. If a file keeps failing that way, describe it or paste the text in it instead.

Other lines the same feature prints

Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.

  • API Error: an image in the conversation could not be processed and was removed. Double press esc to edit your message, or re-read the file if you still need it.
  • API Error: an image in the conversation could not be processed and was removed. Re-read the file with a different approach if you still need it.
  • Image was too large. Double press esc to go back and try again with a smaller image.
  • messages.0.content.5.image.source.base64: image exceeds 5 MB maximum: 5281812 bytes > 5242880 bytes
  • An image in the conversation exceeds the dimension limit for many-image requests (2000px). Run /compact to remove old images from context, or start a new session.
  • API Error: 400 Could not process image
  • Unable to resize image