extracted imgPreload into separated file