We are using SharePoin 2016 on-premise.

I have uploaded our custom favicon to site assets at Url: https://sharepoint.com/sites/abc/SiteAssets/images/Logo48x48.png

In my HTML master page I added this line:

<!--SPM:<SharePoint:SPShortcutIcon runat="server" IconUrl="~sitecollection/SiteAssets/images/Logo48x48.png"/>-->

And end up in the SharePoint page it is requesting for: https://sharepoint.com/sites/pm/~sitecollection/SiteAssets/images/Logo48x48.png?rev=40

Yes, ~sitecollection become part of URL string. I have tried many different combination and all rendered to different funny result. Could you give me a working example for SharePoint 2016?

1 Answer 1


First try adding Full/Absolute URL of icon as below:

<SharePoint:SPShortcutIcon runat="server" IconUrl="https://sharepoint.com/sites/abc/SiteAssets/images/Logo48x48.png" />

If it is working then try adding relative URL like this (If icon is stored on top level site: https://sharepoint.com):

<SharePoint:SPShortcutIcon runat="server" IconUrl="/SiteAssets/images/Logo48x48.png" />

Or you can store this icon file in /_layouts/15/images folder where the original/default favicon is stored and use it like:

<SharePoint:SPShortcutIcon runat="server" IconUrl="/_layouts/15/images/Logo48x48.png" />

Or you can store this icon file in master page gallery and use it like:

<SharePoint:SPShortcutIcon runat="server" IconUrl="/_catalogs/masterpage/images/Logo48x48.png" />
  • I tried full url and it is working. When I tried /SiteAssets/xxxx as you mentioned, it return URL sharepoint.com/SiteAssets/images/Logo48x48.png"
    – Mark L
    Jul 26, 2019 at 9:27
  • You are using this icon for only one site collection or you are going to use if for all site collections? Jul 26, 2019 at 9:27
  • I think it is because o365's site url do not have /sites/xxx/ suffix?
    – Mark L
    Jul 26, 2019 at 9:28
  • I want to use the same Master page for all site collections. I will upload icon to each site collection's SiteAssets library
    – Mark L
    Jul 26, 2019 at 9:28
  • I Guess then it is better to upload this icon at one place at tenant level top site i.e. sharepoint.com/SiteAssets/images/Logo48x48.png for better re-usability. Jul 26, 2019 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.