Skip to content
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

No avatar update on image share option #26

Open
Nispeon opened this issue Feb 26, 2022 · 0 comments
Open

No avatar update on image share option #26

Nispeon opened this issue Feb 26, 2022 · 0 comments

Comments

@Nispeon
Copy link
Collaborator

Nispeon commented Feb 26, 2022

I noticed that my card still shows my avatar from last year, while my page on git-stars.com displays my new avatar.

After some fast digging I realized that the user template actually gets the image's url from github thanks to the user's ID:

<img src="https://avatars.githubusercontent.com/u/{{ user.githubId }}?v=4&s=150" alt="{{ user.username }}" class="{% if user.organization == false %}rounded-circle{% endif %} user-picture-main">

While the image generated to share our stats used an avatar saved locally on the server:

$imagePath = __DIR__ . '/../../public/avatars/' . $user->getGithubId() . '.jpg';

Maybe a system to replace the images after a while would be a nice addition, or maybe we should fetch and store the user's avatar when the user is updated.

I wanted your feedback before digging into it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant