load image in background before showing

load image in background before showing

I was wondering if anyone knew how to load a image in the background and have the current image show until the new image has been downloaded and then swap out the image.  

I currently just have the replace without the buffering. Because of the download time of the new image there is a short time where the image space is blank.  

thank you