You need to use a helper just like in the hello world example.
Your client side javascript:
Template.messages.img_add = function() {
var hash = CryptoJS.MD5(git_email);
return img_add = "http://www.gravatar.com/avatar/" + hash;
}
Your template:
<img src={{img_add}}/>
Or if you want to use it in the {{#each }}
loop, use this slight modification & make sure your {{img_add}}
helper is within the {{#each }}
block. I'm not too sure how your doing the variables, but as long as the git_email
is in each of your documents you're looping over.
Template.messages.img_add = function() {
var hash = CryptoJS.MD5(this.git_email);
return img_add = "http://www.gravatar.com/avatar/" + hash;
}