Added enhanced support for preview images.