The tiddler title needs to be $:/favicon.ico, but the content doesn't need to be in .ico format.
If you put an image file into a tiddler and then rename the tiddler to $:/favicon.ico so far it has worked for me with jpg, png and gif images. I haven't gotten svg to work yet but I think that is a browser issue, not a tiddlywiki issue.
The only other limit I have run into is that it can't be a _canonical_uri tiddler