Added support for image previews (when possible).