diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 29e617ea9d..be4e298810 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -315,7 +315,6 @@ def avatar_for(model, args = {}) image_tag(model.avatar.image.url(args[:size]), args) else args = Avatar.size_from_style!(args) # convert size format :large => '75x75' - args = { :gravatar => { :default => 'mm' } }.merge(args) gravatar_image_tag(model.email, args) end diff --git a/config/initializers/gravatar.rb b/config/initializers/gravatar.rb new file mode 100644 index 0000000000..ae1e492ba9 --- /dev/null +++ b/config/initializers/gravatar.rb @@ -0,0 +1,7 @@ +GravatarImageTag.configure do |config| + config.default_image = :mm # Set this to use your own default gravatar image rather then serving up Gravatar's default image [ 'http://example.com/images/default_gravitar.jpg', :identicon, :monsterid, :wavatar, 404 ]. + config.filetype = nil # Set this if you require a specific image file format ['gif', 'jpg' or 'png']. Gravatar's default is png + config.rating = nil # Set this if you change the rating of the images that will be returned ['G', 'PG', 'R', 'X']. Gravatar's default is G + config.size = nil # Set this to globally set the size of the gravatar image returned (1..512). Gravatar's default is 80 + config.secure = false # Set this to true if you require secure images on your pages. +end