gravatar

Add gravatar.

Specification

{{ user | gravatar }} or
{{ user | gravatar: size }} or
{{ user | gravatar: size, rating }} or
{{ user | gravatar: size, rating, default }} or
{{ user | gravatar: size, rating, default, css_class }}

Parameter Description Example Values
user (required) The user. current_user
size The size of the image. 20
rating The maximum rating. The values are “g”, “pg”, “r” or “x” “g”
default The default imageset to use. The values are “mm”, “identicon”, “monsterid”, “wavatar”, “retro”, “404”, “default” “mm”

Example

Define gravatar.

{{ current_user | gravatar }}

Define gravatar with size.

{{ current_user | gravatar: 20 }}

Define gravatar with size, and rating.

{{ current_user | gravatar: 20, 'g' }}

Define gravatar with size, rating, and default.

{{ current_user | gravatar: 20, 'g', 'mm' }}

Define gravatar with size, rating, default and CSS class name.

{{ current_user | gravatar: 20, 'g', 'mm', 'gravatar' }}