Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use image as background #34

Open
abdulqadir-ml opened this issue Sep 15, 2015 · 2 comments
Open

use image as background #34

abdulqadir-ml opened this issue Sep 15, 2015 · 2 comments

Comments

@abdulqadir-ml
Copy link

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.

@wallin
Copy link
Owner

wallin commented Sep 15, 2015

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.

@abdulqadir-ml
Copy link
Author

Thanks for the prompt response! I'll look forward for this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants