Adding images to cache.