How to set up favicons?

Enonic version: 6.3
OS: Win 7

Hello, I have to implement icons handling for developed site, now facing with some difficulties.
My rel links look like:

<link rel="apple-touch-icon" sizes="114x114" data-th-href="${portal.assetUrl({'_path=img/ico/apple-touch-icon-114x114.png'})}" href=""/>


<link rel="icon" type="image/png" data-th-href="${portal.assetUrl({'_path=img/ico/favicon-194x194.png'})}" sizes="194x194" href=""/>

But I also need to fit in manifest.json with the following content:

"name": "Some name",
"icons": [
		"src": "\/android-chrome-36x36.png",
		"sizes": "36x36",
		"type": "image\/png",
		"density": "0.75"
... etc

and browserconfig.xml with the following:

<?xml version="1.0" encoding="utf-8"?>
      <square70x70logo src="/mstile-70x70.png"/>
      <square150x150logo src="/mstile-150x150.png"/>
      <square310x310logo src="/mstile-310x310.png"/>
      <wide310x150logo src="/mstile-310x150.png"/>

As you see, the path is being relative …
Could you please help and say how these files should be configured/placed to be working correctly?

Assets point to src\main\resources\site\assets\


Hi Alex,

Let’s see if I understood this: Do you need these two files to be placed in root?

Or available on each path level?

If on root you’d need to create a Content Type that only has a TextArea, fill that in with any text and have a page template that just takes that data and renders it with data-th-utext. So each of these files will be content that contains text.

I need it to be accessible from the root I assume? but what worries me is the path to the files inside it.

So imagine I have a page template that renders my pages,
I add a content of a special content-type with XML inside that content
Then I get URL on this content and use it for

<meta name="msapplication-config" content="....FILE BY THIS URL ...." /> ?

and inside that XML file what should I do?

<square70x70logo src="[---insert some path here---]/mstile-70x70.png"/>

and I should set this path inside my page template controller?


How about in that content type adding an item-set for you define all these paths and then loop them out in the XML output?

How about creating a filter that only matches these spesific path’s.
Then it rendering each file with proper references through thymeleaf and moustache?

Alternatively just create these as pages. You should not use page templates as these are one-time pages only. Simply choose a different page controller from the page config.