git-stars
git-stars copied to clipboard
No avatar update on image share option
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:
https://github.com/pgrimaud/git-stars/blob/24abc4e510041a7e1c46efcf1e1d9883a232deaa/templates/user/show.html.twig#L47
While the image generated to share our stats used an avatar saved locally on the server:
https://github.com/pgrimaud/git-stars/blob/24abc4e510041a7e1c46efcf1e1d9883a232deaa/src/Controller/ShareController.php#L81
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 😄