Optimization Changes to Img and Javascript