{{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }}
  {{ with .Site.Params.avatarURL }}
    <div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div>
  {{ end }}
{{ end }}
{{ with .Site.Params.gravatar }}
  <div class="avatar"><img src="https://www.gravatar.com/avatar/{{md5 .}}?s=240&d=mp" alt="gravatar"></div>
{{ end }}
