bug fix on Photo preview feature, only implement photo preview if there is any photo to display.