Replacing default favicon

Shawn Ebeyer asked on September 30, 2016 18:23

Hi,

Is there any way to replace Kentico's default favicon from the app? Or is this a case where it can only be done via server?

I'm also getting error messages saying I cannot upload a .ico file to the media library. How can this be?

Thanks,

Shawn

Correct Answer

Brenden Kehren answered on September 30, 2016 21:54

I use a webpart because you have a lot more control over it than you do with just dumping it all in the master page template head property. You can leave it there, it will work just fine.

Yes, your rendered markup will still have that code being generated but all browsers will use the last one generated and only default to that one if the others aren't found so no worries.

4 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on September 30, 2016 18:39 (last edited on September 30, 2016 18:40)

Just add this to your head tag

<link rel="icon" type="image/png" href="/somewhere/myicon.png" />

That will do the trick :)

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on September 30, 2016 18:40

In the Settings change your file upload settings in 2 places to include .ico extensions. One is under Files and the other is under Media Library. This will allow you to add .ico files

On the master page, add the Head HTML webpart and include your facicons in there. They will be placed after the default one and will override the default. You can always just delete the base one in the file system but then you'll receive an error stating the file is not found.

2 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on September 30, 2016 20:08

Thanks Trevor, Brenden...

Brenden, We currently have all of our 'head' code living on the Master page's template. Is it fine for me to keep this code here, rather than add a Head HTML webpart?

After adding in all of my custom favicons, I still have: <link href="/favicon.ico" type="image/x-icon" rel="icon"> being generated after all of them, thus rendering Kentico's default favicon.

Thanks as always,

Shawn

0 votesVote for this answer Mark as a Correct answer

Shawn Ebeyer answered on September 30, 2016 23:07

Thanks for the help Brenden,

all is looking well on the favicon front now!

Shawn

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.