Changing of SharePoint site favicon: not so easy

SharePoint master pages contain a SharePoint:SPShortcutIcon tag that renders out the default SharePoint icon /_layouts/images/favicon.ico. The icon file is stored in the SharePoint file system hive, and there is no way to change it in a controlled manner other than modifying of the master page or implementing script-based hacks workarounds. Modifying of master page is not the recommended approach for SharePoint Online and there is no CSOM or REST API to replace the hard-coded URL with an URL to an icon file that is relative to a site. It would have been nice if SharePoint architects decided to use the default location of the favicon in the out-of-the-box master pages to a location on the site , like the {masterpagecatog} for example, or to add favicon functionality to SharePoint APIs. 

BTW, if you decide to try to change to URL location in the master page to use the ~site  or the ~sitecollection  token, you will quickly realize that that it does not work because the tokens do not get translated by the implementation of the  SharePoint:SPShortcutIcon  tag (at least in SharePoint 2016 16.0.4639.1002).



Yet another #SharePointPain that kills productive time

Comments

Popular posts from this blog

SharePoint PnP Management Shell - Permissions Consent

Useful SharePoint PowerShell Snippets