only preview the attachment upload when its an image