Skip to content

Profile pictures: add live preview and auto Base64 handling#693

Merged
crocodilestick merged 5 commits intocrocodilestick:mainfrom
angelicadvocate:main
Oct 27, 2025
Merged

Profile pictures: add live preview and auto Base64 handling#693
crocodilestick merged 5 commits intocrocodilestick:mainfrom
angelicadvocate:main

Conversation

@angelicadvocate
Copy link
Contributor

  • Added live circular preview for selected images.
  • Automatically converts images to Base64 before submission.
  • Removed old Base64 <textarea> input and cleaned up unused CSS.
  • Stored data remains in /config/user_profiles.json, fully compatible with existing setup.

angelicadvocate and others added 5 commits October 9, 2025 19:42
…r handling

- Client-side auto-resize to 200×200px using Canvas API with quality preservation
- File size validation (5MB max input, 500KB max output)
- Server-side MIME type and Base64 validation for security
- Comprehensive error handling for FileReader, image loading, and canvas operations
- Form validation: disabled submit until image processed and username entered
- Visual feedback: processing indicator, resize notifications, error messages
- Accessibility improvements: ARIA labels, descriptive help text, proper alt attributes
- Fixed typo: setprofile_picture → set_profile_picture in redirect URL
- Added base64 import to cwa_functions.py
@crocodilestick crocodilestick merged commit fed0e8c into crocodilestick:main Oct 27, 2025
4 checks passed
@crocodilestick
Copy link
Owner

Thanks for this! Great improvements and great work :)

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.

2 participants