Fixed detection of embedded image attachments