Implement image caching