how to get the image_path of any sample from dataset object using skorch?

Using Pytorch Datasets I can create a dataset object that yields (X[i], y[i], image_path[i]). In such way, I can map each item of the dataset with the path where it has been downloaded.

I tried to do that using skorch but skorch dataset object restricts the output to (X[i], y[i]). How can I recover the image_path for any item of the skorch dataset?

I found a solution, but I don't think it should be the proper way for do that. Such solution consists in create a dataframe ordering the rows exactly in the same way pytorch dataset do in the backend...in such way I can map to each other using indexes (0, 1, 2...) (if such order is not changed in other backend steps)