kiwix-js icon indicating copy to clipboard operation
kiwix-js copied to clipboard

Add support for favicon extracted from ZIM metadata

Open Jaifroid opened this issue 1 year ago • 0 comments

As explained in https://github.com/openzim/mwoffliner/issues/1658, some scrapers now produce ZIMs with new illustration metadata entries in the M namespace. See example below from 3dprinting.stackexchange.com_en_all_2022-08.zim, showing the metadata entries and one of the extracted icons (the larger one).

This is now documented in the OpenZIM specification, and is currently only used by Kiwix Serve. It would not be difficult to extract these images, though it's not 100% clear to me how they should be used -- e.g. as primary favicons or as fallbacks in case a page doesn't already point to a favicon in the ZIM.

It would be neat to set the brower tab icon appropriately, according to the loaded ZIM. MWOffliner ZIMs currently don't have these metadata entries. After quick testing, I found them in new Stackexchange and Zimit ZIMs so far.

image image

Jaifroid avatar Sep 10 '22 12:09 Jaifroid