diff --git a/application/Espo/Core/Utils/ClientManager.php b/application/Espo/Core/Utils/ClientManager.php
index 234b3c4def..053368aa4d 100644
--- a/application/Espo/Core/Utils/ClientManager.php
+++ b/application/Espo/Core/Utils/ClientManager.php
@@ -45,8 +45,8 @@ class ClientManager
{
private string $mainHtmlFilePath = 'html/main.html';
private string $runScript = 'app.start();';
- private string $favicon = 'client/img/favicon.ico';
- private string $favicon196 = 'client/img/favicon196x196.png';
+ private string $faviconAlternate = 'client/img/favicon.ico';
+ private string $favicon = 'client/img/favicon.svg';
private string $basePath = '';
private string $apiUrl = 'api/v1';
private string $applicationId = 'espocrm';
@@ -170,8 +170,8 @@ class ClientManager
$cssFileList = $this->metadata->get(['app', 'client', 'cssList'], []);
$linkList = $this->metadata->get(['app', 'client', 'linkList'], []);
- $favicon196Path = $this->metadata->get(['app', 'client', 'favicon196']) ?? $this->favicon196;
- $faviconPath = $this->metadata->get(['app', 'client', 'favicon']) ?? $this->favicon;
+ $faviconAlternate = $this->metadata->get('app.client.favicon') ?? $this->faviconAlternate;
+ [$favicon, $faviconType] = $this->getFaviconData();
$scriptsHtml = implode('',
array_map(fn ($file) => $this->getScriptItemHtml($file, $appTimestamp), $jsFileList)
@@ -205,8 +205,9 @@ class ClientManager
'scriptsHtml' => $scriptsHtml,
'additionalStyleSheetsHtml' => $additionalStyleSheetsHtml,
'linksHtml' => $linksHtml,
- 'favicon196Path' => $favicon196Path,
- 'faviconPath' => $faviconPath,
+ 'faviconAlternate' => $faviconAlternate,
+ 'favicon' => $favicon,
+ 'faviconType' => $faviconType,
'ajaxTimeout' => $this->config->get('ajaxTimeout') ?? 60000,
'internalModuleList' => Json::encode($internalModuleList),
'bundledModuleList' => Json::encode($this->getBundledModuleList()),
@@ -390,4 +391,15 @@ class ClientManager
{
$this->applicationId = $applicationId;
}
+
+ /**
+ * @return array{string, string}
+ */
+ private function getFaviconData(): array
+ {
+ $faviconSvgPath = $this->metadata->get('app.client.faviconSvg') ?? $this->favicon;
+ $faviconType = str_ends_with($faviconSvgPath, '.svg') ? 'image/svg+xml' : 'image/png';
+
+ return [$faviconSvgPath, $faviconType];
+ }
}
diff --git a/client/img/favicon196x196.png b/client/img/favicon-196.png
similarity index 100%
rename from client/img/favicon196x196.png
rename to client/img/favicon-196.png
diff --git a/client/img/favicon.svg b/client/img/favicon.svg
new file mode 100644
index 0000000000..6561bba879
--- /dev/null
+++ b/client/img/favicon.svg
@@ -0,0 +1,81 @@
+
+
+
+
diff --git a/html/main.html b/html/main.html
index 2dc5b739e3..14f8aa9e91 100644
--- a/html/main.html
+++ b/html/main.html
@@ -10,9 +10,8 @@
-
-
-
+
+