diff --git a/app/views/layouts/portal.html.erb b/app/views/layouts/portal.html.erb
index 5d8983621..c4135fd37 100644
--- a/app/views/layouts/portal.html.erb
+++ b/app/views/layouts/portal.html.erb
@@ -39,6 +39,10 @@ By default, it renders:
<% else %>
<%= @portal.page_title%>
<% end %>
+
+ <% if @portal.logo.present? %>
+
+ <% end %>
<% unless @theme_from_params.blank? %>
<%# this adds the theme from params, ensuring that there a localstorage value set %>
diff --git a/spec/controllers/public/api/v1/portals_controller_spec.rb b/spec/controllers/public/api/v1/portals_controller_spec.rb
index 004d013ea..92ab56e5b 100644
--- a/spec/controllers/public/api/v1/portals_controller_spec.rb
+++ b/spec/controllers/public/api/v1/portals_controller_spec.rb
@@ -30,6 +30,32 @@ RSpec.describe Public::Api::V1::PortalsController, type: :request do
expect(json_response['error']).to eql "Domain: www.example.com is not registered with us. \
Please send us an email at support@chatwoot.com with the custom domain name and account API key"
end
+
+ context 'when portal has a logo' do
+ it 'includes the logo as favicon' do
+ # Attach a test image to the portal
+ file = Rails.root.join('spec/assets/sample.png').open
+ portal.logo.attach(io: file, filename: 'sample.png', content_type: 'image/png')
+ file.close
+
+ get "/hc/#{portal.slug}/en"
+
+ expect(response).to have_http_status(:success)
+ expect(response.body).to include('