Image optimization script.