add image preloading - fixes #1