Add type identification and preview for images.