Added pipeline function which selects random image from a cached dataset.