Skip to content

So, favicons can be either PNG, GIF, ICO, …

So, favicons can be either PNG, GIF, ICO, or SVG. (I’m adding favicon support to my feed reader, and Imagick was acting all weird. I’m cheating, too, by using DuckDuckGo’s favicon service, which unfortunately does not return proper MIME types.)

Replies

  1. Jan Boddez Jan Boddez on

    As such, I’m having Imagick read the image data (works for all but ICO), and if that fails, use Imagick::setFormat(‘ico’). And it works! (Except for, well, emoji inside SVGs. A total edge case, I hope, but I’ve got a plan regardless.)

    Via jan.boddez.net, in reply to So, favicons can be either PNG, GIF, ICO, ….

  2. Jan Boddez Jan Boddez on

    The “plan” was to set an emoji font before having Imagick read the SVG, but that doesn’t seem to do much at all (on my instance).
    I’ve since encountered two blogs that use SVGs with a single plain-text emoji in it as their favicons. Might (eventually) just try and swap out these for an actual image, then work off that (or stick with raw SVG).

    Via jan.boddez.net, in reply to So, favicons can be either PNG, GIF, ICO, ….