-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor:简化头像计算,新增头像最大尺寸参数,避免头像裁剪出来太大 || refactor: Simplify the avatar calculation and add a new avatar. Maximum size parameter to prevent the avatar from being cropped too large #199
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for tailchat-nightly ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
0, | ||
0, | ||
size, | ||
size | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is design for common image cropper not only for avatar. for example: group background.
maybe you can check component in client/web/src/components/ImageUploader.tsx#AvatarUploader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, understanding
I dont know why you continue wanna change algorithm This pr has two problem:
if you can not cover it, free feel to tell me, i can merge it and change this logic work fine |
使用的时候遇到提示文件太大,但是手机上的照片动辄10m+,优化了一下裁剪头像,现在选择本地图片可以选择更大的图片了
When using it, I encountered a prompt that the file is too large, but the photos on the mobile phone are often 10m+. I have optimized the cropped avatar. Now you can choose a larger image when selecting a local image.