Class GravatarImages
java.lang.Object
com.kingsrook.qqq.backend.core.actions.profile.GravatarImages
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFetches a Gravatar's raw image bytes, or null when there is none. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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).static voidsetFetcher(GravatarImages.Fetcher replacement) Replace the raw fetch (tests); null restores Gravatar.
-
Method Details
-
png
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
Replace the raw fetch (tests); null restores Gravatar. Also forgets misses.
-