RocketChat / RocketChat/Rocket.Chat
Profile avatar preview and reset behave inconsistently after cancel/save cycles
Nobody has claimed this yet.
- 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
- Go to My Account → Profile.
- Upload a new profile picture (preview shows) and click Cancel.
- Upload the same picture again — preview may not appear.
- Upload a picture, click Save.
- 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.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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