Using local and Gravatar userpics
From MovableType
(Redirected from Gravatar)
Overview
This recipe shows how to display a userpic in MT if it exists, and if not, to fall back to gravatar.
Get the Plugin
Recipe
Enables user icon pictures from the Gravatar service.
<mt:IfNonEmpty tag="CommenterUserpic">
<mt:CommenterUserpicAsset>
<img src="<mt:AssetThumbnailURL width="32" height="32">" width="32" height="32" alt="<mt:CommentAuthor />" class="avatar" />
</mt:CommenterUserpicAsset>
<mt:Else>
<img src="<$MTGravatar rating="g" default="static-URL/images/default-userpic-36.jpg" size="32"$>" alt="<mt:CommentAuthor />" width="32" height="32" class="avatar" />
</mt:IfNonEmpty>