Optimizing cast image and adding analytics