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

Store the GitHub profile images #330

Closed
adrienpoly opened this issue Oct 30, 2024 · 3 comments · Fixed by #480
Closed

Store the GitHub profile images #330

adrienpoly opened this issue Oct 30, 2024 · 3 comments · Fixed by #480

Comments

@adrienpoly
Copy link
Owner

Follow-up to #328

up to now we rely on GitHub to serve the profile images. Very easy to use on our side but it comes with a few gotchas.

We are dependent on GitHub availability and the cache settings cannot be configured. Since GitHub picture profile have very short live cache the images are rarely cached in the browser and can introduce a few blink effect.

I would like to avoid setting up an S3/R2 storage (but open to change my mind)

my idea would be to use the 40gb storage available on the VPs with an active storage configured using the file system.

for the picture profile we could check if one is attached if not fallback to GitHub and launch a background job to attach the image and persist it locally. This way in dev we don’t have to worry about pulling the data and the storage gets constructed slowly overtime

happy to hear alternative suggestions

@marcoroth
Copy link
Collaborator

I feel like this is kind of overkill, because GitHub is generally available.

The other option would be to rely on any of the other socials as fallbacks.

@marcoroth
Copy link
Collaborator

marcoroth commented Oct 30, 2024

One other thing I was wondering, we are referencing the GitHub avatars using an URL that redirects (github.com/[handle].png). I wonder if it's more reliable if we use the URL version where it doesn't have to redirect to get the image (avatars.githubusercontent.com/u/[user_id]) because it presumably doesn't have to go through their app and can just hit the CDN.

@adrienpoly
Copy link
Owner Author

Yeah great idea to use the static version. I suppose that we cannot get a dynamic size as we do now but those images are small enough I think to just get one full size and shrink it in css

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

Successfully merging a pull request may close this issue.

2 participants