RocketChat / RocketChat/Rocket.Chat

Profile avatar preview and reset behave inconsistently after cancel/save cycles

Open
#38,697 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description
When changing a profile picture, the preview and saved avatar can fall out of sync. Uploading, cancelling, saving, and resetting multiple times can leave the old image cached, prevent re-uploading the same file from showing a preview, or keep the old avatar after saving a reset to initials.

Steps to Reproduce

  1. Go to My Account → Profile.
  2. Upload a new profile picture (preview shows) and click Cancel.
  3. Upload the same picture again — preview may not appear.
  4. Upload a picture, click Save.
  5. Click the reset/“no photo” button (initials preview), then Save — sometimes the old photo remains. If you Cancel instead, the preview may stay cleared instead of restoring the previous image.
  6. Repeat the upload/reset/cancel/save cycle a few times; behavior becomes inconsistent.

Expected Behavior

  • Upload shows a preview immediately.
  • Cancel restores the previously saved avatar and clears any new preview.
  • Reset shows initials immediately; saving removes the old photo, cancelling restores the previous photo.
  • Re-uploading the same file always shows a preview after a cancel or reset.

Actual Behavior

  • Preview can disappear or fail to reappear when re-uploading the same file after cancelling.
  • Resetting to initials may still leave the old photo after saving, or leave no avatar visible after cancelling.

https://github.com/user-attachments/assets/e2c7331f-b004-46d6-97cc-986a6815ab30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the My Account → Profile entry point and reproduce the upload, cancel, save, and reset cycles described in the issue. Trace the avatar preview and saved-state handling, then verify that cancel restores the saved avatar, reset saves initials, and re-uploading the same file reliably shows a preview.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.