https://avatars2.githubusercontent.com/u/12345?s=360
Just replace the value after /u/ with any number. There are several million photos. I suppose you can guess who picture #1 belongs to. Optionally, you can set the size using the s parameter. In this example it is 360 pixels in height and width.
But please don't go hog wild and start downloading thousands of images in a short period of time, otherwise Github will probably notice that and start to implement limits which will ruin it for all developers. If you keep it to a thousand and avoid repeatedly calling their server, you will not get noticed as though you were a bot. A better solution is to perform a one-time download of all the images you need and cache them and use them from your own device or server rather than constantly hitting Github's server.
Better yet, there's a free API at:
https://fakedata.dev/
It allows you to generate about a million random users or 1,000 non-random users.