4 ms·
Regarding the avatar images: Why not a <div> with a border-radius & background color? Seems you could achieve the same thing without another HTTP request (1 f
by arcameron 11y ago
Regarding the avatar images:
Why not a <div> with a border-radius & background color? Seems you could achieve the same thing without another HTTP request (1 for each unique avatar), no need to zopfli 45,000 unique files.
- bunkat 11y agoI was confused by this as well, you could also support more colors this way. Since it's just a circle with a letter, I don't think there would be concerns with crispness of the icon.
- kbuck 11y agoThese are default (placeholder) avatars. Users can upload their own avatar image as well. They're serving PNGs so they don't have to deal with the case where users using default avatars get HTML output whereas users who have uploaded an avatar get an image inserted.
- cfcef 11y agoSee the comments: lots of tweaking and unreliability and not guaranteed to work in emails, apparently.
- codinghorror 11y agoAlso font and alignment issues cross browser can be brutal. There is a lot to be said for a tiny image that works everywhere, on any device.
- qopp 11y agoWhat about an svg?
- other_herbert 11y agoThat wont work in email... I'm generating a usage graph (svg) that is emailed and the graph will not display in the client.. Must be opened in a browser
- ZeroGravitas 11y agoSeems like you could use an SVG avatar for clients that can handle it and fallback to PNG for email.
- Reedx 11y agoThat's what I was thinking too, but they really want it to be pixel perfect in every browser, email, etc. They have a good in-depth discussion about all the options and pros/cons of each approach here: https://meta.discourse.org/t/optimizing-letter-avatar-rendering/33082 https://meta.discourse.org/t/optimizing-letter-avatar-render...