Fix image optimization