All Gravatar images are based on the use of an email address. Specifying the email address will allow you to request an image for that email.

<img src="{exp:ce_gravatar:single email=''}" alt="" />

Note: If no email address is provided, the default Gravatar (below) will be used:

<img src="{exp:ce_gravatar:single email=''}" alt="" />


The dimension in pixels, that you would like to be used for the Gravatar image width and height (all Gravatar images are square. The value should be a whole number greater than 0 and less than or equal to 512. If not specified, the default size is 80px.

Note: Many user-uploaded Gravatar images are low resolution, so requesting large images may result in pixelated and/or low-quality images.

<img src="{exp:ce_gravatar:single email='' size='250'}" alt="" />
<img src="{exp:ce_gravatar:single email='' size='100'}" alt="" />
<img src="{exp:ce_gravatar:single email='' size='10'}" alt="" />
<img src="{exp:ce_gravatar:single email='' size='1'}" alt="" />


The behavior to fallback to if a Gravatar cannot be found for the provided email address hash. This parameter can be a URL to an image you would like to use or any of the following:

  • 404: will return `` (an empty string) if the user does not have an image. If using the tag pair syntax, this also gives you the ability to check if a Gravatar exists by using the {if gravatar}{/if} conditional.
  • mm: mystery-man (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: 8-bit arcade-style pixelated faces

The following are examples of the different default types:

Here is the code used to create the above example images:

<!-- custom URL -->
<img src="{exp:ce_gravatar:single email='' default=''}" alt="" />

<!-- 404 -->
{exp:ce_gravatar:pair email="" default="404"}
{if gravatar}
{!-- a Gravatar image exists for the provided email address --}
<img src="{gravatar}" alt="" />
{!-- no Gravatar, so let's create our own default image --}
{exp:ce_img:single src="/images/example/cow_square.jpg" max="80"}

<!-- mm -->
<img src="{exp:ce_gravatar:single email='' default='mm'}" alt="" />

<!-- identicon -->
<img src="{exp:ce_gravatar:single email='' default='identicon'}" alt="" />

<!-- monsterid -->
<img src="{exp:ce_gravatar:single email='' default='monsterid'}" alt="" />

<!-- wavatar -->
<img src="{exp:ce_gravatar:single email='' default='wavatar'}" alt="" />

<!-- retro -->
<img src="{exp:ce_gravatar:single email='' default='retro'}" alt="" />

Note: Note that the email address specified in the examples above is fake and does not have a Gravatar associated with it.

Note: If you use a custom URL for the default, make sure it is pre-sized to your desired dimensions, as the Gravatar service no longer resizes the image for you.


You may want to force the default image to be used. For example, if you have your default parameter set to default="monsterid", and you always want a monster to be generated for each email address, if they have a Gravatar image or not, you would enable this parameter. Otherwise, the monsterid would only show up for email addresses that do not have an associated Gravatar image.

<!-- This email address has a Gravatar -->
<img src="{exp:ce_gravatar:single email='' default='monsterid'}" alt="" />

<!-- This email does not have a Gravatar -->
<img src="{exp:ce_gravatar:single email='' default='monsterid'}" alt="" />

<!-- This email address has a Gravatar, but the default is forced -->
<img src="{exp:ce_gravatar:single email='' default='monsterid' force_default='yes'}" alt="" />


The Gravatar site explains ratings in the following way:

Gravatar allows users to self-rate their images so that they can indicate if an image is appropriate for a certain audience. By default, only 'G' rated images are displayed unless you indicate that you would like to see higher ratings.

This parameter can be set to any of the following values:

  • g: suitable for display on all websites with any audience type
  • pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence
  • r: may contain such things as harsh profanity, intense violence, nudity, or hard drug use
  • x: may contain hardcore sexual imagery or extremely disturbing violence
<img src="{exp:ce_gravatar:single email='' rating='pg'}" alt="" />


If the page on which you are displaying Gravatar images is being served over SSL, then you will want to enable this parameter.

<!-- Normal -->
<img src="{exp:ce_gravatar:single email=''}" alt="" />

<!-- Secure -->
<img src="{exp:ce_gravatar:single email='' use_https='yes'}" alt="" />

The above template code results in the following HTML:

<!-- Normal -->
<img src="" alt="" />

<!-- Secure-->
<img src="" alt="" />


If you would like your Gravatar to have a file-type extension, you can enable this parameter. A .jpg extension will be appended to your URL.

<!-- Normal -->
<img src="{exp:ce_gravatar:single email=''}" alt="" />

<!-- With extension -->
<img src="{exp:ce_gravatar:single email='' add_extension='yes'}" alt="" />

The above template code results in the following HTML:

<!-- Normal -->
<img src="" alt="" />

<!-- With extension -->
<img src="" alt="" />