Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gravatar : Is there a default image?

I have implemented gravatar for a portal I am building and wanted to know if there is a default image URL for gravatar? Not all people who visit the site are logged in or have email addresses, in such a case, is there a default image that can be shown (accessible via gravatar url)

like image 275
Ritesh M Nayak Avatar asked Apr 21 '10 14:04

Ritesh M Nayak


People also ask

How do I change my default Gravatar?

If you wish to change the default avatar, in the WordPress admin dashboard, head to Settings > Discussion. Scroll down to the Default Avatar section and you'll see a few additional options are provided for selection.

What is Gravatar profile picture?

A Gravatar is a Globally Recognized Avatar. You upload an image and create your public profile just once, and then when you participate in any Gravatar-enabled site, your Gravatar image and public profile will automatically follow you there. Gravatar is a free service for site owners, developers, and users.

What is the difference between avatar and Gravatar?

Yes, Gravatar is just another term for/type of avatar. It's just your user image, and yes, on other blogs/sites that support Gravatar, your image will come with you.


2 Answers

To select a default image, you can use the d parameter:

http://www.gravatar.com/avatar/3b3be63a4c2a439b013787725dfce802?d=identicon 

Or without a hash:

http://www.gravatar.com/avatar/?d=identicon 

Or without the d parameter:

http://www.gravatar.com/avatar 

Source: gravatar.com.

like image 114
Macmade Avatar answered Oct 06 '22 08:10

Macmade


Gravatar describe the options for default images here: http://en.gravatar.com/site/implement/images/

You can select which option you want by adding the appropriate name/value pair to your url. For example, you could use "mystery person" (d=mp) which looks like this:

The above image was created with the url http://www.gravatar.com/avatar/?d=mp. Note that the email hash string has been omitted but normally you would include it as part of the request.

Options listed at the above link:

  • 404: do not load any image if none is associated with the email hash, instead return an HTTP 404 (File Not Found) response
  • mp: (mystery-person) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash)
  • identicon: a geometric pattern based on an email hash
  • monsterid: a generated 'monster' with different colors, faces, etc
  • wavatar: generated faces with differing features and backgrounds
  • retro: awesome generated, 8-bit arcade-style pixelated faces
  • robohash: a generated robot with different colors, faces, etc
  • blank: a transparent PNG image (border added to HTML below for demonstration purposes)

As you would hope, using the size option s=<pixels> also changes the size of the default image.

enter image description here

The above image was created with http://www.gravatar.com/avatar/?d=retro&s=32

Thanks to @Alireza Rezaee for the updated image types.

like image 30
bw1024 Avatar answered Oct 06 '22 08:10

bw1024