microsoft / microsoft/Web-Dev-For-Beginners
**To Reproduce** Steps to reproduce the behavior: 1. Go to **Upload Page** 2. Click on **Select File** 3. Choose any .jpg image 4. The app crashes and displays the error **Expected behavior** The image should upload successfully and show a preview instead of crashing. **Screenshots**  **Desktop (please complete the following information):**
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 96.7k
- Forks
- 15.9k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Describe the bug
When trying to upload an image, the application crashes with an error message: "Unexpected token in JSON".
To Reproduce
Steps to reproduce the behavior:
- Go to Upload Page
- Click on Select File
- Choose any
.jpgimage - The app crashes and displays the error
Expected behavior
The image should upload successfully and show a preview instead of crashing.
Screenshots

Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome
- Version: 117
Smartphone (please complete the following information):
- Device: Samsung Galaxy S22
- OS: Android 13
- Browser: Chrome Mobile
- Version: 117
Additional context
This issue only happens with .jpg files larger than 5 MB. .png uploads work fine.
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 Upload Page and reproduce the failure with a .jpg larger than 5 MB in Chrome; no source file or test is identified in the issue. Done means the image uploads and shows a preview without the “Unexpected token in JSON” error, while existing .png uploads continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100