Added image caching to speed up image change