IndieWeb Avatar, yet another Eleventy Image Service API
The Eleventy API ecosystem is growing (again).
- Screenshots
- Sparklines
- And now, avatars.
I use Twitter avatars everywhere. They require an Twitter Developer account and an API key to implement. They require the talent being pictured to have a Twitter account (not everyone does). I wanted a more open alternative. I decided to build a little image service that would fetch the icon from any web site, optimize it using Eleventy Image, and return that instead.
Demo
If you want a live demo in the wild, check out the Eleventy Leaderboards (via Speedlify).
Source Code
Only one path parameter is supported right now: /[url]/
(must be encoded via e.g. encodeURIComponent
)
My version is running on https://v1.indieweb-avatar.11ty.dev/
using the same versioning via Netlify Branch Subdomains strategy as the screenshot and sparkline services.
It makes use of Netlify’s On-Demand Builders to reduce the number of external HTTP requests to generate the images.
7 Comments
@mxbck
nice! I've been looking for something exactly like this for my blogroll 🙌
@zachleat
Awesome!
@nhoizey
OMG, did you really use my avatar in your demo? 😅
@schneyra
Exactly this.
@giuseppegurgone
zravatar
@zachleat
ahaha that has a nice webring to it
Nicolas Hoizey
@zachleat it is a great solution (how could I say something different with your demo… 😅), but I like to host these icons myself, and I love SVG so much… 🤷♂️