added exception for image preview