Skip to content

Instantly share code, notes, and snippets.

@wangyingang
Last active May 10, 2017 16:41
Show Gist options
  • Save wangyingang/11202627 to your computer and use it in GitHub Desktop.
Save wangyingang/11202627 to your computer and use it in GitHub Desktop.
Get gravatar image using command line(Mac OS X only)

#Get Gravatar image using command line(Mac OS X only)

Gravatar image download url

http://www.gravatar.com/avatar/HASH

Get default image

curl -o yourname.png http://www.gravatar.com/avatar/$(md5 -q -s youremail@example.com)

Get image with specified formart

curl -o yourname.jpg http://www.gravatar.com/avatar/$(md5 -q -s youremail@example.com).jpg

Get image with specified size (size = 200 pixel, height and width are both 200 pixel)

curl -o yourname200.png http://www.gravatar.com/avatar/$(md5 -q -s youremail@example.com)?s=200

More info: Gravatar document

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment