Clone wiki

gravatar-taglib / Home


This library generates a link for gravatar images in JSP files

The project is on the maven central repository, so you can easy implement by add the dependency

In your pom:


Example usage


<%@ taglib prefix="gravatar" uri="" %>
<gravatar:image email="" size="64"/>

this taglib has 3 attributes:

  • email - String (required)
  • size - int (optional, default 32)
  • forceHttps - boolean (optional, default the servlet contexts protocol)


<%@ taglib prefix="gravatar" uri="" %>
<img src="${gravatar:image(pEmail, 32, false)}" alt="Gravatar" title="Gravatar"/>

gravatar:image function takes 3 argument

  • email address
  • picture size in pixels
  • HTTP/HTTPS boolean