Optimize images for web using python