Added caching ability to image handler.