How do I access a Single file wikis favicon?

Folks,
If we create a tiddlywiki and provide a $:/favicon.ico tiddler containing an appropriately formatted image browser tabs find the favicon and displays it in the tab. For example see tiddlywiki.com.

When creating a URL to any site it would be nice to be able to access this favicon so as to add imagery and color to the URL.

Question:
Is there a way to reference the favicon on tiddlywiki’s using a URI for both http[s] and File protocols in an external reference?

For most websites, the site icon is stored in the file http://host.domain/favicon.ico, e.g. https://www.google.com/favicon.ico.
You could insert that as an external image next to the link. Depending on the implementation, you might want to check first if it exists. There are inline methods to define the favicon, as used by TW, but these would be much more difficult to access externally.
This applies to “normal” websites only, so I’m not sure if this is what you meant – your topic refers to wiki favicons, while your text refers to “URL to any site”…

Have a nice day
Yaisog

This might help regards what can or cannot be assumed about a favicon if it exists.

https://www.w3.org/2005/10/howto-favicon

Thanks folks. I am specificaly interested if we can access the favicon tiddler as the browser does.

If I understand you correct, then you can use this service to show favicons of any site in your TW.

https://icon.horse/icon/[site name]
For example, https://icon.horse/icon/tiddlywiki.com

I tried following markup in my TW, and it worked fine

[img[https://icon.horse/icon/tiddlywiki.com]]

Another, option is to write a plugin to try to different URLs where a site can place its favicon and pick the URL which does not return 404.

2 Likes