Package Exports
- svelte-gravatar
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (svelte-gravatar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
svelte-gravatar
Svelte component for rendering a gravatar profile image. Adjusts automatically to HiDPI displays.
Based on the brilliant react-gravatar from Kyle Mathews.
Demo
https://svelte-gravatar.now.sh/
Usage
See https://en.gravatar.com/site/implement/images/ for documentation on all the options.
Avoid exposing email
If you wish to avoid sending an email address to the client, you can
compute the md5 hash on the server and pass the hash to the component
using the md5 prop instead of the email prop.
Defaults
- 50x50 image
- g rated photos
- alt as
Gravatar for {email} - retro backup faces for emails without profiles
- only load image when on the screen
Props
- size
- alt
- rating = 'g';
- md5
- protocol
- useWaypoint
- waypointOptions - Please refer to svelte-waypoint
- domain
- default
- class
- style
Use defaults
<Gravatar email="jocolopes@gmail.com" />
Override all defaults
<Gravatar email="jocolopes@gmail.com" size={100} rating="pg" default="monsterid" alt="Image from email" useWaypoint={false} domain="www.gravatar.com" protocol="http://" />