Project

General

Profile

Feature #24927 » 0001-Hires-2x-DPR-image-support-for-Gravatars.patch

Jan from Planio www.plan.io, 2017-01-26 13:36

View differences:

lib/plugins/gravatar/lib/gravatar.rb
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
(2-2/6)