Fixed uploaded attachments not being recognized as image attachments