The gravatar ViewHelper returns the URL to a Gravatar.

If you want to know more about Gravatars, please visit the official Gravatar website.

-> Since BIGACE 3.0

Further infos at the ViewHelper gravatar() PHPDoc.


  • $email - (required, string) The Email to get the Gravatar for.

  • $default - (required, string) The fallback image, if no Gravatar exists.

  • $rating - (optional, string) The maximum rated image that might be displayed (see Gravatar website for more infos)

  • $size - (optional, integer) The size of the image.


This example shows to ...

  $email = "";
  $size  = 48;
  $url   = $this->gravatar($email, "", "G", $size);

  echo `<img src="'.$url.'" alt="Gravatar for '.$email.'" border="0" width="'.$size.'" />`;