Blazor web app
create a my-logo.svg-file from your my-logo.png-file (1000 pixels x 1000 pixels or less)
copy it here:
<head>
...
<link rel="icon" href="images/my-logo.svg">
</head>
problem with favicon on the blazor site
Saeed Pooladzadeh
241
Reputation points
Hello,
I have made a site in blazor server.
Why is my favicon not displayed on the site, while when I run it in VisualStudio, it is displayed without any problem?
thanks
Developer technologies ASP.NET ASP.NET Core
4,815 questions
Developer technologies .NET Blazor
1,673 questions
Developer technologies ASP.NET Other
3,598 questions
2 answers
Sort by: Most helpful
-
Timo Kinnunen 126 Reputation points
2023-05-29T18:17:49.37+00:00 -
AgaveJoe 30,126 Reputation points
2022-11-24T12:39:18.957+00:00 Your responses are not clear.
The browser looks for favicon.ico in the application root which is the wwwroot folder not wwwroot/site_icons.
Did you added a link element or changed how the static file handler works?
Also, you tagged this question as MVC and Web API but your question states this is a Blazor application.