Added a short function to preload an image source