-
-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace default GitHub avatar #688
Comments
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. |
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. |
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. |
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. |
Hi @driesvints So I found something for the coloured github default avatar thing. We can get the current user avatar from the I found this package image-comparator-laravel and it has 100% accuracy for this (I tried on 5 samples). This package uses Let me know if this package and approach looks good. I'll take it up :) |
Hah that's an elaborate way to go about it @tauseefsshah! Do you think a PR could fulfil all the requirements listed above? |
@driesvints Following is my understanding of the pending requirements:
Following is my solution:
Let me know if I am missing on any requirement or should change the approach. |
Yes that's correct. Although I'm not sure we'd want to add that many columns. Tbh I'd like to see a more simpler solution. Maybe we should let this issue be for what it is for now. |
@driesvints I noticed on the github identicon blog post tauseefsshah found it said "for anyone without a Gravatar" - therefore everyone with a Github & Gravatar will have a profile picture They have a rest API so where you can use SHA256 hash email...
Notes
Even though it says "for anyone without a Gravatar" I quickly made some curl calls and I believe you can have github profile picture but gravatar api returns no profile - So you can have "false-negatives" but shouldn't have "false-positives" I hope that makes sense. In addition to users signing up with a different email In other words it would remove all the default github icons, but you might lose some users avatars. If this is a tradeoff you're willing to live with I'm happy to code it up |
Thanks for your research @Nathan-Cowin. How do you see the implementation? API calls on every image display? Or regular syncs? |
Figure our a way to show a grayed out Laravel logo as a default avatar instead of the current default GitHub one.
The text was updated successfully, but these errors were encountered: