DEV Community

Discussion on: Dynamic Favicons

Collapse
 
johnletey profile image
John Letey

I'm gonna prefix this with I don't think my way is the only way to do this.

This way works for me - and it's very simple.

As you've mentioned, you can just put the media tag inside the SVG code of your favicon.

But of what I've seen with this - it doesn't automatically switch, and you have to reload

The reason why I love this solution is because it's automatic as soon as you toggle themes.

If you are interested in going down the SVG route - I'd suggest you look here.