Fake Profile Pictures



While building & testing acani, an iPhonw app for meeting people nearby with similar interests, I used the Fast Faker (ffaker) Ruby Gem to generate fake profile data. I also wanted to generate fake profile pictures, so I scraped a collection of hand-selected portraits from Flickr.


The code is open sourced under the MIT License.

All photos are licensed under the Creative Commons - Attribution 2.0 Generic or Creative Commons - Attribution-ShareAlike 2.0 Generic licenses. Thus, the photos may be used for commercial purposes as long as you obey the Attribution (attribute the work to the owner) and/or ShareAlike (only share the work under the same license) clauses.


Simply, access the photos from the GitHub directory that contains the Fake Profile Pictures from Flickr.

How to Contribute New Pictures

  1. Find open-source portraits on Flickr. Make sure the original is large enough to be reduced to 640x960px and still look good.

  2. For each photo:

    1. Download the original & open in Photoshop (or any application that can resize photos).
    2. Select the Marquee Tool. Set the settings to a 3:2 ratio. Copy & paste the desired portion of the image to a new canvas.
    3. Resize the image to 640x960px & 320x480px (bicubic sharper for reduction) and save for web (select Preset: JPEG High, then set to Maximum).
  3. Make thumbnails with the RMagick resize-pics.rb script. Add the picture number to the gravity array if you want the thumbnail to be positioned above center. The resize-pics.rb script requires the RMagick Ruby Gem, which depends upon ImageMagick.

  4. Re-seed the MongoDB database and regenerate the seed/pics-thbs/README.md file with the MongoDB profiles.rb script. If you just want to regenerate the README.md file, just comment out all the excess code. Otherwise, the execution of the profiles.rb script requires MongoDB and the mongo Ruby Gem.

  5. Push your changes (or send me a pull request and make sure I merge in your changes). Then, send a message to the Flickr user with a link to https://github.com/acani/acani-sinatra/tree/master/seed/pics-thbs/ to inform them of and thank them for the usage.


I challenge you to take on implementing these enhancements. Think you can hack it?