Search code examples
ruby-on-railsimagewidthimage-sizegravatar

Specifying width of gravatar img in Rails


Would there possibly be a way I could specify the width for a gravatar img instead of just :size => x

<%= gravatar_for user, :size => 125, :class => "indexlist" %>

Solution

  • No. To confirm this, take a look here: http://en.gravatar.com/site/implement/images/

    Size

    By default, images are presented at 80px by 80px if no size parameter is supplied. You may request a specific image size, which will be dynamically delivered from Gravatar by using the s= or size= parameter and passing a single pixel dimension (since the images are square).

    Only the size (s) parameter is exposed by their API.

    http://www.gravatar.com/avatar/296f29c92c1561c79e034df64dc19f56?s=128