Skip to content

Implement profile picture/banner crop system & gif support#40

Merged
richardscull merged 2 commits intoSunriseCommunity:feat/image-upload-cropfrom
asteriau:croppable-profile-elements
Mar 22, 2026
Merged

Implement profile picture/banner crop system & gif support#40
richardscull merged 2 commits intoSunriseCommunity:feat/image-upload-cropfrom
asteriau:croppable-profile-elements

Conversation

@asteriau
Copy link
Contributor

As the title says, this PR implements a system to crop profile pictures/banners before uploading them, much like discord.
This adds a new dependency (react-easy-crop) but i think it's worth the headache of implementing it myself.

Previews:
image
image

It's functional, but i'm open to UI/UX improvement suggestions :)
The code itself is a little messy as i did this at like 6 am (oops)
It also supports gifs since i wanted that in my fork. Feel free to remove that if you wish to make it a supporter feature or similar in the future.

@asteriau
Copy link
Contributor Author

didn't know you guys don't use pnpm oops might wanna remove the lockfile

@asteriau
Copy link
Contributor Author

one issue is the admin panel not using this, will look into it when i have the time

@richardscull richardscull self-requested a review March 19, 2026 20:42
Copy link
Member

@richardscull richardscull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! The code is actually very excellent quality, but I just have small nitpicks about it. Most important comments would be with how we crop the image in ImageCropDialog.


Regarding some of your comments:

It also supports gifs since i wanted that in my fork.

I'm not sure what do you mean by this? I see that current implementation just default to standard gif upload and don't crops it. The gifs themselves were already supported for uploading 🤷‍♂️

one issue is the admin panel not using this, will look into it when i have the time

Seems just a question of adding new props to the ImageSelect. The only issue that the current locals address image crop as "your" avatar/banner, which is not true for admin panel.

@richardscull richardscull changed the base branch from main to feat/image-upload-crop March 22, 2026 15:02
@richardscull
Copy link
Member

@asteriau Is fine with the requested changes, but don't have time to implement it herself.
Which is why I'm going to merge it in feature branch, implement requested changes and then merge this to main.

@richardscull richardscull merged commit 47a59db into SunriseCommunity:feat/image-upload-crop Mar 22, 2026
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