add image preloader functionality