I'm trying to create 1000 random profile pics of people defined by demographics.e.g : 85% Women, aged - 20 - 29 , Nationality : American and so on...
Does anyone know any services that'll do this for me? If not does anyone have any good ideas on how to do it with an emphasis on realistic profile pictures and their names?
Thanks
Best Answer
Of course it would not be allowed to grab pictures/profiles from Facebook without the users knowing about it, but there are several generators out there for this:
- http://randomuser.me/ (if you want more than just pics)
- http://lorempixel.com/ (use the "people" tag)
see https://developers.facebook.com/docs/graph-api/reference/user/picture/
<html><body><script>function getRandomInt() {return Math.floor(Math.random() * (10000 - 5)) + 4;}for(var i=0; i<10; i++) {imgUrl = "http://graph.facebook.com/v2.5/" + getRandomInt() + "/picture?height=200&height=200";elem = document.createElement("img");elem.setAttribute("src", imgUrl);elem.setAttribute("width", 200);elem.setAttribute("height", 200);document.body.appendChild(elem);}</script></body></html>
<html><body><script>function getRandomInt() {return Math.floor(Math.random() * (10000 - 5)) + 4;}for(var i=0; i<10; i++) {imgUrl = "http://graph.facebook.com/v2.5/" + getRandomInt() + "/picture?height=200&height=200";elem = document.createElement("img");elem.setAttribute("src", imgUrl);elem.setAttribute("width", 200);elem.setAttribute("height", 200);document.body.appendChild(elem);}</script></body></html>
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.
enter link description here
enter link description here
it gives gender-specific pictures
More :- https://randomuser.me/
<html><body><script>function getRandomInt() {return Math.floor(Math.random() * (10000 - 5)) + 6;}for(var i=0; i<10; i++) {imgUrl = "http://graph.facebook.com/v2.5/" + getRandomInt() + "/picture?height=350&height=350";elem = document.createElement("img");elem.setAttribute("src", imgUrl);elem.setAttribute("width", 350);elem.setAttribute("height", 350);document.body.appendChild(elem);}</script></body></html>