Class GravatarImages

java.lang.Object
com.kingsrook.qqq.backend.core.actions.profile.GravatarImages

public final class GravatarImages extends Object
A user's chosen Gravatar, fetched by the server and re-encoded like an uploaded photo: browsers never contact Gravatar (no viewer IP, no email hash in any URL), and nothing Gravatar returns is served as-is. Fetched and converted once per avatar version: the sizes are kept in the avatar storage table (gravatars/{avatarId}/{version}/{size}.png) and served from there; a user with no Gravatar is remembered for ten minutes per node. Conversions use their own single permit, so they never take the upload decoders.
  • Method Details

    • png

      public static byte[] png(UserProfiles.Avatar avatar, int size)
      The avatar's Gravatar as a PNG of the given size, or null when the user has none there (or Gravatar can't be reached; clients then draw initials).
    • setFetcher

      public static void setFetcher(GravatarImages.Fetcher replacement)
      Replace the raw fetch (tests); null restores Gravatar. Also forgets misses.