{"id":14973420,"url":"https://github.com/wallin/angular-gravatar","last_synced_at":"2025-04-07T12:05:20.810Z","repository":{"id":9672754,"uuid":"11615107","full_name":"wallin/angular-gravatar","owner":"wallin","description":"Easy-to-use and flexible Angular.js directive for Gravatar images","archived":false,"fork":false,"pushed_at":"2016-05-30T08:04:39.000Z","size":112,"stargazers_count":150,"open_issues_count":4,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T10:04:27.115Z","etag":null,"topics":["angular1","gravatar","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wallin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-23T17:52:31.000Z","updated_at":"2024-11-28T16:27:36.000Z","dependencies_parsed_at":"2022-08-25T23:32:18.120Z","dependency_job_id":null,"html_url":"https://github.com/wallin/angular-gravatar","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallin%2Fangular-gravatar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallin%2Fangular-gravatar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallin%2Fangular-gravatar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallin%2Fangular-gravatar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wallin","download_url":"https://codeload.github.com/wallin/angular-gravatar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648976,"owners_count":20972945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular1","gravatar","javascript"],"created_at":"2024-09-24T13:48:41.631Z","updated_at":"2025-04-07T12:05:20.789Z","avatar_url":"https://github.com/wallin.png","language":"JavaScript","readme":"[![Bower version](https://badge.fury.io/bo/angular-gravatar.svg)](http://badge.fury.io/bo/angular-gravatar)\n[![NPM version](https://badge.fury.io/js/angular-gravatar.svg)](http://badge.fury.io/js/angular-gravatar)\n\n[![Build Status](https://travis-ci.org/wallin/angular-gravatar.svg?branch=master)](https://travis-ci.org/wallin/angular-gravatar)\n[![Code Climate](https://codeclimate.com/github/wallin/angular-gravatar.svg)](https://codeclimate.com/github/wallin/angular-gravatar)\nangular-gravatar\n==============\n\nAngular.JS directive for [Gravatar](http://www.gravatar.com).\n\nCopyright (C) 2015, Sebastian Wallin \u003csebastian.wallin@gmail.com\u003e\n\nRequirements\n-----\n\n* AngularJS (http://angularjs.org)\n\nInstall with Bower\n-----\n\n```\nbower install angular-gravatar\n```\n\nInstall with NPM\n-----\n\n```\nnpm install angular-gravatar\n```\n\nUsage\n-----\nInclude angular-gravatar.js in your application.\n\n```html\n\u003cscript src=\"bower_components/angular-gravatar/build/angular-gravatar.js\"\u003e\u003c/script\u003e\n```\n\nAdd the module `ui.gravatar` as a dependency to your app:\n\n```js\nvar app = angular.module('app', ['ui.gravatar']);\n```\n\nThen use the directive on an image tag and it will set the correct `src`\nattribute for you.\n\n```html\n\u003c!-- using a scope variable //--\u003e\n\u003cimg gravatar-src=\"user.email\" gravatar-size=\"100\"\u003e\n\u003c!-- or a string directly //--\u003e\n\u003cimg gravatar-src=\"'sebastian.wallin@gmail.com'\" gravatar-size=\"100\"\u003e\n```\n\nIf the source is already an MD5 hash, it will be left untouched (thanks @thewarpaint)\n\n#### Binding Once\n\nIf you know that the source is not going to change, you can use the `gravatar-src-once` instead:\n\n```html\n\u003cimg gravatar-src-once=\"user.email\"\u003e\n```\n\n\u003e Note: this directive will watch for a non falsy value and then stop watching.\n\nConfiguration\n-----\n\nThe options that are sent along to Gravatar can be set either\ndirectly in the directive as seen above with `size` or configured as default\nparameters via the `gravatarServiceProvider`:\n\n```js\nangular.module('ui.gravatar').config([\n  'gravatarServiceProvider', function(gravatarServiceProvider) {\n    gravatarServiceProvider.defaults = {\n      size     : 100,\n      \"default\": 'mm'  // Mystery man as default for missing avatars\n    };\n\n    // Use https endpoint\n    gravatarServiceProvider.secure = true;\n\n    // Force protocol\n    gravatarServiceProvider.protocol = 'my-protocol';\n\n    // Override URL generating function\n    gravatarServiceProvider.urlFunc = function(options) {\n      // Code to generate custom URL\n    };\n  }\n]);\n```\n\nNote that by default, no explicit protocol is set. This means that the image will use the protocol with which the page is loaded. For example; if the page url is http://www.example.com the image will be loaded over http, but if the page url is https://www.example.com the image will be loaded over https.\n\nAnyway, you can force the protocol you want (for `https` use `secure = true` instead of `protocol = 'https'` because gravatar url differs for secure/no secure).\nFor example, if you are developing a mobile app with Cordova you should use `http`. Otherwise directive will use `file` protocol and fail.\n\nAll the available options can be seen over at the [Gravatar docs for image\nrequests](https://sv.gravatar.com/site/implement/images/)\n\nLicense\n-----\n\nMIT\n\n[Contributors](https://github.com/wallin/angular-gravatar/graphs/contributors)\n-----\n* Alexander Makarenko, [@estliberitas](https://github.com/estliberitas)\n* Eduardo Garcia, [@thewarpaint](https://github.com/thewarpaint)\n* Thomas Vervest, [@tvervest](https://github.com/tvervest)\n* Gonzalo Aguirre, [@gaguirre](https://github.com/gaguirre)\n* Gabe Hayes, [@gabehayes](https://github.com/gabehayes)\n* Peter Dave Hello, [@PeterDaveHello](https://github.com/PeterDaveHello)\n* Kalisa Falzone, [@KalisaFalzone](https://github.com/KalisaFalzone)\n* Victor Torres, [@victor-torres](https://github.com/victor-torres)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallin%2Fangular-gravatar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwallin%2Fangular-gravatar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallin%2Fangular-gravatar/lists"}