use image as background
Hello. I'd like to use gravatar images as background. Is there any way to do this currently? I've replaced this line (line no 423):
element.attr('src', gravatarService.url(newVal, opts));
with this:
element.css({'background-image': gravatarService.url(newVal, opts)});
I had to move this library out from bower to libs folder for this simple task. But I'm sure I'm missing out something! Any help would be appreciated. Thanks in advance.
Hi, yes, you'll have to specify the background image url using the url(...) keyword (http://www.w3schools.com/cssref/pr_background-image.asp)
So: element.css({'background-image': 'url(' + gravatarService.url(newVal, opts) + ')'});
Settings background images from Gravatar is a very reasonable use-case, I'm gonna see if I can add this as a built in feature.
Thanks for the prompt response! I'll look forward for this feature!