Replace images with optimized versions using imagemin