Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Opensearch icon support is crippled #1694
DokuWiki will only produce valid image data for the Opensearch xml file if the source favicon.ico is composed of a 16x16.png, a 32x32.png, and a 48x48.png, and if those images are 8-bit. Otherwise it creates new lines in the base64 data (at 76 characters) and leaves off the last character - which means the OpenSearch browser entry will not have an icon.
A favicon.ico with more than three images, of different sizes, or 24-bit (or mixture of 8 and 24-bit) will display fine as a both a favicon or an icon for OpenSearch.
If an OpenSearch xml file is manually created and added to the browser it will display fine (i.e. the problem is in DokuWiki).
As it stands, if you want to use an icon for Opensearch you can't use large favicons, or more than 8-bit.
Attached contains the default dokuwiki favicon.ico and the valid Opensearch xml it creates. A custom favicon.ico containing more than three image size, which are not all 8-bit, a valid manually created Opensearch xml file. And also an example of a broken Opensearch.xml generated by DokuWiki.
NOTE: I couldn't find any documentation on this limitation to DokuWiki and Opensearch, and it took a bit of (frustrating) experimentation to find out why custom favicons wouldn't display icons in Opensearch.
I don't have write access to DokuWiki documentation, but I've written a guide in a forum post for anyone who is motivated and does. Thanks.
Is this behaviour happening for all browsers?
A quite random google search hits at 10kB limit for remote linked icons. Your case is about embedded, so this limit should not apply.
The head page of the FAQ is protected to prevent that everybody address there every question and against people who spam this page. btw the pages in the
Agreed about the 10KB limit only applying to URI:http and not base64 encoded
The Best Practice guide recommends that a 64x64 pixel image be included in the favicon, which DokuWiki currently does not support. When it is included (see previously attached archive containing valid_manually_created.xml) Firefox will use the 64x64 pixel image for both the page tag and the Opensearch icon. I haven't tested larger images (yet).
As for FAQ: I'll add something to the tips namespace soon, though I note that Google reflects my own experience - that there has been a lot of posts seeking information about favicons in DokuWiki (though I'm not sure how many of those posters even glance at documentation before posting).