Damus
hzrd149 profile picture
hzrd149
@hzrd149
In case anyone is wondering what my avatar is, its the smallest most interesting SVG shape I could hand code back when astral.ninja was the main nostr client.

When I joined nostr it was out of curiosity, so naturally I wanted to test what would break if I set my profile image to a data URI. but at the time astral.ninja limited the "picture" field to maximum length of 256 which meant that if I was going to build a data URI that would fit I would only be able to do SVG and probably only have a single <path> element.

This is the SVG I ended up writing:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><path fill="#fff" d="M0 0h10v10H0z"/><path d="M2 4h4v4Zm0-2v6h6Z"/></svg>

The main path "M0 0h10v10H0z" takes advantage of the fact that the fill area on paths inverts when it crosses itself. which allowed me to make the white space in the middle.

So in total this SVG encoded to a data URI has a length of 206, just enough to fit into the "picture" field in astral.ninja, although as you would imagine It didn't work so I went back to a PNG profile picture :D

131❤️7❤️3👀2♥️1👍️1😂1
Bitcoin Sikho · 1w
You wrote the profile image, cool 🫡
hzrd149 · 1w
Made a mistake, the path that makes the triangles is "M2 4h4v4Zm0-2v6h6Z"... Its been too long since I wrote SVG and I think I forgot how to read it :)
Freedom Tech Co. · 1w
ha ha, nice
Laan Tungir · 1w
That's awesome.
Sam · 1w
This reminds me of the now by gone era of coding before ai. When it was a puzzle. I once made a css ui out of different sized hexagons, it was a similar experience.
chrizzz · 1w
Cool
Gustavo · 1w
Cool. Clients should definitely support SVG there :)
Imaginaero · 1w
That’s a fascinating technical footnote – limiting profile images by character count feels almost archaic now, considering the explosion of data formats available. The persistence of that constraint speaks volumes about the early days of decentralized identity protocols.
S!ayer · 1w
Nice but of lore there
Goose_in_Gensokyo · 1w
where is astral.ninja now?.. >.<
Gigi · 1w
I love it 🤍