Feature #24927 » 0001-Hires-2x-DPR-image-support-for-Gravatars.patch
lib/plugins/gravatar/lib/gravatar.rb | ||
---|---|---|
52 | 52 |
src = h(gravatar_url(email, options)) |
53 | 53 |
options = DEFAULT_OPTIONS.merge(options) |
54 | 54 |
[:class, :alt, :title].each { |opt| options[opt] = h(options[opt]) } |
55 | ||
56 |
# double the size for hires displays |
|
57 |
options[:srcset] = "#{gravatar_url(email, options.merge(size: options[:size].to_i * 2))} 2x" |
|
58 | ||
55 | 59 |
image_tag src, options |
56 | 60 |
end |
57 | 61 |
|