Renders a Gravatar image.

Parameters:
NameTypeDescription
propsobject

Component props.

Properties
NameTypeDescription
altTextstring

The alt text for the image.

circularboolean

Whether to display the image as a circle.

customAttributesstring

The custom attributes for the component.

customClassesstring

The custom classes for the component.

defaultImagestring

The default image to use if the email address does not have a Gravatar. One of 404, mp, identicon, monsterid, wavatar, retro, robohash, blank, or a URL.

emailHashstring

The email hash for the Gravatar.

forceDefaultboolean

Whether to force the default image to be used.

heightnumber

The height of the image.

imageAttributesobject

The custom attributes for the image.

ratingstring

The rating for the Gravatar image. One of g, pg, r, or x.

sizenumber

The size of the requested Gravatar image.

widthnumber

The width of the image.

Since
  • 4.0.7
Returns:

Return the Gravatar component in React.

Type: 
JSX.Element
Example
import Gravatar from '@gravityforms/components/react/admin/modules/Gravatar';

return (
    <Gravatar
        altText="Gravatar"
        defaultImage="mp"
        emailHash="8486aca7237c742c03f9b3d5ee3789fabad38a63868b89a9646175fafe297297"
        forceDefault={ true }
        height={ 100 }
        size={ 100 }
        width={ 100 }
    />
);