Apply imageReplace when replacing images. Doh.