diff --git a/app/assets/javascripts/discourse/lib/avatar-template.js.es6 b/app/assets/javascripts/discourse/lib/avatar-template.js.es6 index 731a2047d89..4d2fdb2bf74 100644 --- a/app/assets/javascripts/discourse/lib/avatar-template.js.es6 +++ b/app/assets/javascripts/discourse/lib/avatar-template.js.es6 @@ -17,7 +17,7 @@ function defaultAvatar(username, letterAvatarColor) { if (Discourse.SiteSettings.external_letter_avatars_enabled) { const url = Discourse.SiteSettings.external_letter_avatars_url; - return `${url}/letter/${username[0]}?color=${letterAvatarColor}&size={size}`; + return `${url}/letter/${username[0]}/${letterAvatarColor}/{size}.png`; } else { return Discourse.getURLWithCDN(`/letter_avatar/${username.toLowerCase()}/{size}/${version}.png`); } diff --git a/app/models/user.rb b/app/models/user.rb index aa46dd7c77f..75d732ea679 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -454,7 +454,7 @@ class User < ActiveRecord::Base [((result << 5) - result) + char.ord].pack('L').unpack('l').first end - avatar_template = split_avatars[hash.abs % split_avatars.size] + split_avatars[hash.abs % split_avatars.size] end else letter_avatar_template(username) @@ -471,7 +471,7 @@ class User < ActiveRecord::Base def self.letter_avatar_template(username) if SiteSetting.external_letter_avatars_enabled color = letter_avatar_color(username) - "#{SiteSetting.external_letter_avatars_url}/letter/#{username[0]}?color=#{color}&size={size}" + "#{SiteSetting.external_letter_avatars_url}/letter/#{username[0]}/#{color}/{size}.png" else "#{Discourse.base_uri}/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar.version}.png" end