diff --git a/app/models/user.rb b/app/models/user.rb index 315eac92d82..c33b5f99a0c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -873,7 +873,7 @@ class User < ActiveRecord::Base SiteSetting.logo_small && SiteSetting.use_site_small_logo_as_system_avatar if use_small_logo - UrlHelper.absolute(SiteSetting.logo_small.url) + Discourse.store.cdn_url(SiteSetting.logo_small.url) else self.class.avatar_template(username, uploaded_avatar_id) end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 33bd7b57737..c6abcb33f3a 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1339,7 +1339,7 @@ describe User do describe '#avatar_template' do it 'uses the small logo if the user is the system user' do - logo_small_url = UrlHelper.absolute(SiteSetting.logo_small.url) + logo_small_url = Discourse.store.cdn_url(SiteSetting.logo_small.url) expect(Discourse.system_user.avatar_template).to eq(logo_small_url) end