What is the exact message?
The first line is Claude Code's own prompt, the one most people search for. The three below it are API errors and appear in the transcript:
Image was too large. Double press esc to go back and try again with a smaller image.
API Error: 400 ... image dimensions exceed max allowed size
API Error: an image in the conversation could not be processed and was removed.
An image in the conversation exceeds the dimension limit for many-image requests (3000px). Run /compact to remove old images from context, or start a new session.That first line tells you what to do with it: double-press Esc to go back and try again with a smaller image.
The could not be processed and was removed line means the API refused an image in the conversation, such as one over the size or dimension limits.
What does it mean?
The image you pasted or attached exceeds the API's size or dimension limits, so the request is refused before Claude sees it. The last variant is the many-image case: the limit drops when a conversation already carries a lot of images, and the message prints the pixel limit it hit.
If you see the could not be processed and was removed line, an image in the conversation is over a limit and the API has dropped it from what it will accept. The line does not say which image; check the ones attached earlier in the conversation as well as the newest.
Why does it keep coming back?
On older versions the bad image could stay in the conversation, so every later message failed the same way. Anthropic documents three such bugs, and each needs an update rather than another resize:
- Before v2.1.299, in a long conversation with many images, Claude Code could remove the images you attached last instead of the one over the limit. The
was removedline then repeated on every turn, and Claude did not see your new images. - Before v2.1.299, in VS Code, the Desktop app and the Agent SDK, images you attached while Claude was working did not get the resizing other attached images get. They reached the API at their original size, which led to repeated image errors in long conversations.
- Before v2.1.166, a pasted image could remain in the conversation, and the same error then repeated on every subsequent message.
How do I fix it?
- Resize the image before pasting. The API accepts images up to 8000 pixels on the longest edge for a single image, or 3000 pixels when more than 20 images are in context.
- Take a tighter screenshot of the relevant region instead of the full screen.
- For the many-image message, run
/compactat the Claude Code prompt if the message names it, or start a new session with fewer images. - If the error repeats, update Claude Code. Anthropic's three cases above are version bugs: an older build keeps the offending image in the conversation, so the message returns on every turn until the version changes.
How do I know it is fixed?
- The message you sent is answered, and Claude describes the image you attached.
- The error does not repeat on the next turn, which is the sign the conversation no longer carries the offending image.
- If it does repeat after a resize, it can be one of the version bugs above: update Claude Code.
Where these answers come from
- The four messages, the meaning of the
was removedline, the 8000px and 3000px limits, the three version bugs and the fix steps: Anthropic's error reference, Image was too large, read November 23, 2026.
Common questions
What image size does Claude Code accept?
The API accepts images up to 8000 pixels on the longest edge for a single image, or 3000 pixels when more than 20 images are in context. Anthropic's fix is to resize the image before pasting it.
Why does the error keep coming back after I paste a new image?
On older versions the bad image could stay in the conversation, so every later turn failed the same way. Anthropic names three of these: before v2.1.299 a long conversation with many images could drop the images you attached last instead of the one over the limit, and attachments made in VS Code, the Desktop app and the Agent SDK while Claude was working did not get the resizing the others get; before v2.1.166 a pasted image could remain in the conversation. Updating Claude Code is the fix.
Does /compact clear the many-image limit?
Yes, when the message names it. Anthropic's fix for the dimension limit for many-image requests message is to run /compact at the Claude Code prompt if the message names it, or to start a new session with fewer images.
What does an image that was removed from the conversation mean?
The line API Error: an image in the conversation could not be processed and was removed. means the API refused an image already in the conversation, such as one over the size or dimension limits.