Added image preloading support.