Skip to content
Generate a url of a face photo for prototyping your apps!
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A simple library to generate a url of photo of a face, for use in development, design, and testing of your local projects.

Generates urls that point to the awesome uiFaces by @calebogden


Add this line to your application's Gemfile:

gem 'uifaces'

And then execute:

$ bundle

Or install it yourself as:

$ gem install uifaces


Get a random face:

If you don't care which face is assigned to a particular user or place in your page, use this:

UIFaces::face # => ""

Get a specific face:

If you are assigning faces to users of your app for development/testing, you may want to avoid having the same faces assigned randomly to different users.

If so, you can pass an integer index to retrieve the Nth face.

UIFaces::face(1) => ""
UIFaces::face(1) => ""

If you pass an index higher than the number of faces, it will recycle the faces starting with the first face, so you can use this to map a face to profile id, for instance:

User.each do |user| = UIFaces::face(


  • Build some system to locally cache the images
  • Integrate with twitter to get faces of your followers/followings


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


Big shoutout to @calebogden for building uiFaces. Library written by @jakeonrails

Something went wrong with that request. Please try again.