Skip to content

✨ Profile photo crop and preview before upload #29

@fusion94

Description

@fusion94

Summary

Profile.jsx currently uploads any chosen image at its original aspect ratio, which produces lopsided avatars. Add an in-browser crop step so members commit to a square JPEG before the upload happens.

Proposed Approach

  1. Add react-easy-crop (or equivalent — small dep, ~30KB).
  2. When the user picks a file, open a modal showing the image with a square crop overlay.
  3. On confirm, render the cropped region to a canvas, convert to a JPEG Blob, and POST that instead of the original file.
  4. Show the result in the Profile preview before the user clicks Save.

Acceptance Criteria

  • Picking a file opens a crop modal, not an immediate upload.
  • User can drag and zoom inside the crop window.
  • Confirming uploads a square JPEG <= the existing 5MB limit.
  • Cancel returns to the profile without uploading.
  • Existing avatars continue to work (no migration needed).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions