To implement Gravatar in my Rails3 application, I'm using the gravatar_image_tag gem in a helper, but I'm having issues when mixing 2 config options:
- If the user doesn't have a gravatar attached to his email a default image is rendered; but I want it to reference an external file (e.g.,
http://www.iconfinder.com/ajax/download/png/?id=43350&s=128
instead of:identicon
or others) - I also want the image to be resized on the fly to, let's say 50px.
Independently, both options work as expected, but when I put them together:
def gravatar_for(user, options = { :default => 'http://www.iconfinder.com/ajax/download/png/?id=43350&s=128', :size => 50 }) gravatar_image_tag(user.email.downcase, :alt => user.full_name, :class => 'gravatar', :gravatar => options) end
the size option is not applied, and the gravatar gets rendered in it's full size (128px in this case).
What am I doing wrong, or how can I achieve this combination?