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

✨ Enhancement: Optimize Contributor Avatar Image Sizes #1388

Closed
Karan-Palan opened this issue Feb 1, 2025 · 5 comments · Fixed by #1389
Closed

✨ Enhancement: Optimize Contributor Avatar Image Sizes #1388

Karan-Palan opened this issue Feb 1, 2025 · 5 comments · Fixed by #1389
Assignees
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Status: In Progress This issue is being worked on, and has someone assigned.

Comments

@Karan-Palan
Copy link
Contributor

Karan-Palan commented Feb 1, 2025

Is your feature request related to a problem? Please describe

The current implementation of the contributor avatars on the Community page leads to longer load times due to unoptimized image sizes. This affects page performance, based on @benjagm's comment on #1364

Describe the solution you'd like

  1. Optimize Image Loading with Next.js Image Component:
    • Use priority for the first 10 images to load eagerly.
    • Enable lazy loading (loading="lazy") for images not in the initial viewport.
    • Adjust quality to 75 to reduce file size without compromising visible quality.
  2. Serve Images in Modern Formats:
  3. Programmatically resize oversized avatars server-side before rendering.

Describe alternatives you've considered

No response

Additional context

No response

Are you working on this?

No

@Karan-Palan Karan-Palan added Status: Triage This is the initial status for an issue that requires triage. ✨ Enhancement Indicates that the issue suggests an improvement or new feature. labels Feb 1, 2025
@benjagm
Copy link
Collaborator

benjagm commented Feb 1, 2025

Thanks for creating the issue @Karan-Palan !!

@DhairyaMajmudar, thoughts on this approach?

@DhairyaMajmudar
Copy link
Member

DhairyaMajmudar commented Feb 1, 2025

Thanks Karan-Palan for opening the issue

Point 1 of solution is good to use in our case, we already use Next image component, adding mentioned configuration will improve it further.

As of point 2 we need to update the next.config file with desired image format and domains from where they are fetched. In our case we are using json date to fetch images so it won't useful here.

@DhairyaMajmudar DhairyaMajmudar self-assigned this Feb 1, 2025
@DhairyaMajmudar DhairyaMajmudar added Status: In Progress This issue is being worked on, and has someone assigned. Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. and removed Status: Triage This is the initial status for an issue that requires triage. labels Feb 1, 2025
@Karan-Palan
Copy link
Contributor Author

Makes sense regarding point 2 @DhairyaMajmudar . You're working on this right?

@DhairyaMajmudar
Copy link
Member

Thanks! Yeah, I'm opening a PR

@Karan-Palan
Copy link
Contributor Author

Thanks! Yeah, I'm opening a PR

Alright!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: Accepted It's clear what the subject of the issue is about, and what the resolution should be. Status: In Progress This issue is being worked on, and has someone assigned.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants