When MIME Sniffing Breaks Your AI Agents Eyes

Dev.to AI
Generative AI Computer Vision

Your user sends a screenshot. Your agent responds as if nothing was attached. No error message. No retry. Just. blindness. Welcome to, where a MIME sniffing library quietly breaks image processing for an entire class of PNG files. The Bug When OpenClaw processes an image attachment, it runs fileTypeFromBuffer to detect the real MIME type. The idea is sound: dont trust the client-provided MIME, verify it. The problem? Certain PNG files - especially those exported from apps like WeChat - get classified as image/apng (Animated.