Skip to content

Comment on Show HN: AI Generated (Not-Real) User Avatar Images for Development Needsparent

Comments

timzOP

I love emojis too. Check out my other project, https://emojifavicon.dev/, to use emojis as favicons

Did you know you can also use a data-URI as a favicon? And if you use a <text> element inside that SVG, you can set any text as a favicon - including an emoji.

For example, this sets the favicon to a little picture of the text "!!!":

    <link
    rel="icon"
    href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">!!!</text></svg>'
    />
You can also replace the "!!!" in the above snippet with any emoji, and it works. (I couldn't do an emoji here because HN filters them out.)

You could maybe add this as an option for copying code from your site, and the result will work without any request to any server (with the caveat that the emoji design will vary depending on OS).

timzOP

That is a cool trick, i should add an option to copy that code as well.

What is the license of the GitHub emoji assets?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.