Skip to content

fix: replace <img> with next/image and fix avatar alt text - #1279

Closed
LeC-D wants to merge 1 commit into
shyamtawli:masterfrom
LeC-D:fix/next-image-avatar-alt
Closed

LeC-D wants to merge 1 commit into
shyamtawli:masterfrom
LeC-D:fix/next-image-avatar-alt

Conversation

@LeC-D

@LeC-D LeC-D commented Jun 27, 2026

Copy link
Copy Markdown

Fixes #1261

Changes

  • components/Profile.jsx: Replaced <img> with next/image (Image component), set explicit width={96} and height={96}, and updated alt from the generic "User logo" to the descriptive `${data.name}'s avatar`. The existing onError fallback to /defaultAvatar.webp is preserved.
  • next.config.mjs: Added images.remotePatterns for avatars.githubusercontent.com and github.com so Next.js allows GitHub avatar URLs.

Acceptance criteria

  • <img> replaced by <Image> with explicit width/height
  • alt is now "<Name>'s avatar" — screen reader friendly
  • Fallback to /defaultAvatar.webp still works via onError
  • GitHub avatar hosts whitelisted in next.config.mjs

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@LeC-D is attempting to deploy a commit to the Shyam Tawli's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @LeC-D! 🎉 Thank you for opening a pull request. Your contribution is valuable and we appreciate your efforts to improve our project.

Soon the maintainers/owner will review it and provide you with feedback/suggestions.

@LeC-D LeC-D closed this Jun 27, 2026
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 this pull request may close these issues.

[Bug]: Replace <img> with next/image and fix avatar alt text

1 participant