How to load png using dataloader

Was there changes in DataImageFolder after 2019? I have this DL program which I made 2019, and I need to revisit it and actually use the then taught NN to classify new data. I didn’t have then any sub-folders, but all images were in root image dir. “path/to/images/” Now using the same code, it complains it cannot find any sub-folders. Is there some quick method to use the old way of working?
“FileNotFoundError: Couldn’t find any class folder in ./path/to/images/.”