Commit 650bc136 authored by jplang's avatar jplang

Hires (2x DPR) image support for Gravatars (#24927).

Patch by Jan Schulz-Hofen.

git-svn-id: https://svn.redmine.org/redmine/trunk@16313 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 041d360a
......@@ -52,6 +52,10 @@ module GravatarHelper
src = h(gravatar_url(email, options))
options = DEFAULT_OPTIONS.merge(options)
[:class, :alt, :title].each { |opt| options[opt] = h(options[opt]) }
# double the size for hires displays
options[:srcset] = "#{gravatar_url(email, options.merge(size: options[:size].to_i * 2))} 2x"
image_tag src, options
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment