smarter image caching, only reload images that change since last run