Skip to content

Add User Profile Picture Upload and Display Across Application #1542

@Riyanshu-256

Description

@Riyanshu-256

Problem Statement

Currently, user avatars are displayed inconsistently across the application:

  • The Profile page shows the first letter of the user's name as an avatar.
  • The Dashboard displays a static/dummy profile image.

This prevents users from personalizing their accounts and creates an inconsistent user experience.

Proposed Solution

Implement a profile picture upload feature that allows users to upload and manage their profile image.

Features

  • Upload a profile picture from the Profile Settings page.
  • Store the uploaded image URL in the database.
  • Display the uploaded image across the application, including:
    • Profile page
    • Dashboard greeting section
    • Any future user avatar locations
  • Show a default avatar when no profile image exists.

Suggested Implementation

Backend

  • Add a profileImage field to the User schema.
  • Create an API endpoint for image uploads.
  • Store images using Cloudinary (or the project's existing image storage solution).
  • Save only the image URL in the database.

Frontend

  • Add an image upload component to the Profile page.
  • Preview the selected image before upload.
  • Replace the letter avatar with the uploaded profile image.
  • Replace the Dashboard's dummy image with the uploaded profile image.

Acceptance Criteria

  • Users can upload a profile picture.
  • Uploaded images are validated for type and size.
  • Profile picture persists after page refresh and re-login.
  • Profile page displays the uploaded image.
  • Dashboard displays the uploaded image.
  • Default avatar is shown when no profile image is available.
  • UI updates immediately after a successful upload.

Screenshots

Image Image

Benefits

  • Improved personalization
  • Better user experience
  • Consistent avatar display across the platform
  • More professional and modern UI

Additional Notes

The current implementation uses a letter-based avatar and a static placeholder image. Both should be replaced with the user's uploaded profile picture wherever applicable.

Metadata

Metadata

Assignees

Labels

backendIssues related to server-side, database logic or APIsfeatureImprove existing feature or add newfrontendIssues related to UI/UXstale-assignees:warning

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions