https://github.com/fakiolinho/gravatar-component
An element providing a wrapper for quick gravatar images / urls.
https://github.com/fakiolinho/gravatar-component
gravatar gravatar-components polymer polymer2
Last synced: about 2 months ago
JSON representation
An element providing a wrapper for quick gravatar images / urls.
- Host: GitHub
- URL: https://github.com/fakiolinho/gravatar-component
- Owner: fakiolinho
- Created: 2016-01-31T17:01:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-17T00:32:45.000Z (about 2 years ago)
- Last Synced: 2025-03-29T20:30:31.775Z (3 months ago)
- Topics: gravatar, gravatar-components, polymer, polymer2
- Language: HTML
- Size: 2.9 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gravatar-component
An element providing a wrapper for quick gravatar images.
## How to Install
```
npm install --save gravatar-component
```## Demo
Test it [here](http://fakiolinho.github.io/gravatar-component/components/gravatar-component/)## Usage
1.Simple gravatar image with an alt text:
```javascript
```
2.Simple gravatar url with a custom fallback image:
```javascript
```
3.Simple secure retina ready gravatar:
```javascript
```
4.Simple gravatar image with monsterid images as fallbak
```javascript
```
5.Simple gravatar image using hash
```javascript
```
## Options
| Attribute | Type | Default Value | Description |
| --- | --- | --- | --- |
| **altText** | String | null | Image's alternate text |
| **defaultImage** | String | null | Custom default image as fallback |
| **email** | String | null | The email address |
| **hash** | String | null | Hashed Email |
| **imageSet** | String | mm | Default imageset to use if not custom defaultImage is provided [ 404 , mm , identicon , monsterid , wavatar ] |
| **rating** | String | g | Maximum rating (inclusive) [ g , pg , r , x ] |
| **secure** | Boolean | false | True for Https and False for Http |
| **size** | Number | 80 | Size in pixels, defaults to 80px [ 1 - 2048 ] |
| **retina** | Boolean | false | True in order to check for retina screen and request a gravatar with double size |## License
[MIT](http://opensource.org/licenses/MIT) license.