Problem
When users upload large images (>2000px) and have >20 images in a conversation, Anthropic rejects the request:
At least one of the image dimensions exceed max allowed size for many-image requests: 2000 pixels
This error persists in history, blocking subsequent messages until manually removed.
Proposed Solution
Add frontend validation to auto-resize images on paste/drop:
- Extract dimensions when creating
ImageAttachment (decode base64 → Image element → naturalWidth/Height)
- Auto-resize to 2000px if larger (canvas downscale, preserve aspect ratio)
- Show indicator when image was resized: "Image resized from 4000×3000 to 2000×1500"
Provider Limits Reference
| Provider |
Single Image |
Many-Image (>20) |
| Anthropic |
8000px |
2000px |
| OpenAI |
2000px |
2000px |
| Google |
8000px |
8000px |
Problem
When users upload large images (>2000px) and have >20 images in a conversation, Anthropic rejects the request:
This error persists in history, blocking subsequent messages until manually removed.
Proposed Solution
Add frontend validation to auto-resize images on paste/drop:
ImageAttachment(decode base64 → Image element → naturalWidth/Height)Provider Limits Reference