laravel.io
laravel.io copied to clipboard
Replace default GitHub avatar
Figure our a way to show a grayed out Laravel logo as a default avatar instead of the current default GitHub one.
Gonna re-open this to keep our target to also figure out a way to replace the default GitHub avatar. Maybe we can sync through GitHub web hooks to figure out if a user is using a default GitHub avatar or not.
To be clear: I mean the coloured block ones in this screenshot should also be the greyed out Laravel.io icon.

Additionally, we should filter out empty avatars on the homepage so we have a full wall of photo's.
Might also want to remove unavatar in total because we seem to be running into rate limiting issues. Not sure what the best way forward is here.
- get user info from api
https://api.github.com/users/USERNAME
- on 200, temporarily download image
$response->avatar_url
- if image !png, return
- if image !420x420, return
- if image has > 2 colours, return (more resource intensive)
Not sure if I'll have enough time to sit and implement this, but thought I'd leave these notes regardless
oh nice @ProjektGopher. Thanks a lot for digging into that! Definitely useful for follow up.
Might also want to remove unavatar
We could store a user’s GitHub avatar URL in the DB when they register. Then we could check if the URL needs to be updated each time a user logs in or through a scheduled job.
@imacrayon yeah I was first thinking about GitHub webhooks but that might be a bit too complex. A middleware on logged in routes that checks the updated_at timestamp of a logged in user and rechecks the avatar might work.