I would like to display avatars in a similar way that GitHub does. This would be especially useful for the scoreboard.
The GitHub API has a field on GET /users/:username that gives us a user's avatar on GitHub. On their site, they append &s=40 to the URL (to scale it to 40 pixels on the server side), set the image size to 20 pixels, and add a border radius of 3 pixels. Note that the image size is twice as large in each dimension as it is on the page to support retina displays (and other displays with high pixel densities).
I would like to display avatars in a similar way that GitHub does. This would be especially useful for the scoreboard.
The GitHub API has a field on
GET /users/:username
that gives us a user's avatar on GitHub. On their site, they append&s=40
to the URL (to scale it to 40 pixels on the server side), set the image size to 20 pixels, and add a border radius of 3 pixels. Note that the image size is twice as large in each dimension as it is on the page to support retina displays (and other displays with high pixel densities).