Gravatar plugin for Craft CMS 3.x

Adds gravatar support.

Configuring Gravatar

The plugins allows you to configure the following settings directly from your CP:

  • Gravatar URL ( default: //gravatar.com/avatar/ )
  • Size ( default: 80 )
  • Rating ( default: mp )
  • Default Avatar ( default: mp )

Detailed instructions what are the allowed values are defined here: https://de.gravatar.com/site/implement/images/

Inside the plugin settings (and also in the config.php) you have also the detailed instructions and options.

Using Gravatar

Get the Gravatar URL with default settings

{{ craft.gravatar.url( 'hello@example.com' ) }}

Get the Gravatar URL with custom settings

{{ craft.gravatar.url( 'hello@example.com', {'s' : 120, 'd': 'identicon', 'r' : 'x'} ) }}

Get the Gravatar IMG with default settings

{{ craft.gravatar.img( 'hello@example.com' ) }}

Get the Gravatar IMG with custom settings

{{ craft.gravatar.img( 'hello@example.com', {'s' : 120, 'd': 'identicon', 'r' : 'x'} ) }}

Get the Gravatar IMG with custom settings and attributes

{{ craft.gravatar.img( 'hello@example.com', {'s': 120}, {'class' : 'useravatar'} ) }}
Installation Instructions

To install this plugin, copy the command above to your terminal.

Active Installs
10
Version
1.0.0
License
MIT
Compatibility
Craft 3
Last release
May 30, 2018