mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 06:46:01 +01:00
Hires (2x DPR) image support for Gravatars (#24927).
Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16313 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user