optimized the img