use crafatar to serve avatars
This commit is contained in:
@@ -74,10 +74,11 @@ class User < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def avatar(size, options = {})
|
def avatar(size, options = {})
|
||||||
options[:class] ||= "avatar"
|
options[:class] ||= "avatar"
|
||||||
options[:size] ||= size.to_s
|
options[:width] ||= size
|
||||||
options[:alt] ||= "avatar"
|
options[:height] ||= size
|
||||||
return image_tag("https://minotar.net/helm/#{CGI.escape(self.ign)}/#{CGI.escape(size.to_s)}", options)
|
options[:alt] ||= "avatar"
|
||||||
|
return image_tag("https://crafatar.com/avatars/#{CGI.escape(self.uuid)}?size=#{size}&helm", options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
|
|||||||
Reference in New Issue
Block a user