feat: display author profile picture#556
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
danielroe
left a comment
There was a problem hiding this comment.
for the cli we directly return the image, hashed.
not sure of the cost of doing the same, but there's the issue of: third party origins, and potential privacy concerns...
|
Oh ye I missed that. The CLI has access to the user email which could be private, so I guess we should ignore this and keep the public-data-only solution. But maybe we need the expertise of someone more qualified in this ? However I don't know who would be a good fit. |
# Conflicts: # app/pages/~[username]/index.vue
|
a quick fix would be to add a server endpoint to proxy to gravatar, so we don't expose user IPs to a third party without consent |
|
Oooh ok I did not think about it that way, that's on me 👀 Then we would add cache to it, which means if the user wants to change or delete its profile picture, it'll still be live on npmx for as long as the cache lives. |
|
seems fine to me 👍 |
# Conflicts: # app/pages/~[username]/index.vue # shared/utils/constants.ts
|
Made the changes : the API endpoint now returns a data url with the image in base 64. |
# Conflicts: # server/utils/npm.ts
|
While browsing preview in three different browsers, the Gravatar of |
|
thanks for the spot! a bit of code I hadn't tidied up |
Co-authored-by: Daniel Roe <daniel@roe.dev>
Resolves #435
How it works :
I cached the data for one day, I consider it way enough for the profile picture which realistically doesn't change many times a day.