Image attachments inflate prefill (hundreds to thousands of vision tokens to process) and add transport plus preprocessing overhead before inference starts. Downscale, use prompt caching, and crop to attack both.
Imagine you ask a friend a question by text. They reply quickly. Now you also send them a big photo of your screen and ask the same question. They have to wait for the photo to download over slow Wi-Fi and then study it before they can answer. Two separate slowdowns: the photo took time to arrive, and reading it took longer than reading your short text. Sending a smaller crop of just the part you care about helps both. If you keep sending the same photo, remembering it from last time helps even more.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: latency budget breakdown, transport plus preprocessing cost, prefill expansion, mitigation order, operational metrics.
Real products, models, and research that use this idea.
- Claude Opus 4.7 and Sonnet 4.6 vision both show TTFT lifts of 300 to 800 ms per high-resolution image attachment.
- OpenAI GPT-5.5 vision exposes a low detail mode that caps image tokens to a small fixed budget for fast scene-gist tasks.
- Gemini 3.1 Pro context caching reduces repeated-image prefill cost dramatically for document-assistant workloads.
- Anthropic's prompt caching documentation explicitly calls out image prefixes as the highest-leverage caching target.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow much does base64 actually add versus binary upload?
QWhy does prompt caching speed up prefill, not just reduce cost?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Blaming inference. The latency hit is mostly prefill and preprocessing, both of which happen before the model emits a single output token. Tuning generation parameters does not help here.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.