-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Maintain aspect ratio of non-square avatar uploads #1268
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
Comments
Gogs issue: gogs/gogs#4132 |
I would pad, rather than crop, the uploaded image. |
I think that this could be done on the front-end before it is uploaded (similar to GH) using something like this |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
* Crop avatar before resizing (#1268) Signed-off-by: Rob Watson <[email protected]> * Fix spelling error Signed-off-by: Rob Watson <[email protected]>
Automatic closing of Issues make no sense. Please give a status about this Issue? Is it fixed? Will it be fixed? |
Sorry, It is fixed by #7025 |
* Crop avatar before resizing (go-gitea#1268) Signed-off-by: Rob Watson <[email protected]> * Fix spelling error Signed-off-by: Rob Watson <[email protected]>
[x]
):Description
When uploading a non-square image as an avatar, it gets resized to a square image. This results in distorted avatars. In my opinion, It would be reasonable to crop the image and maintaining the original aspect ratio.
https://github.com/go-gitea/gitea/blob/master/models/user.go#L431
Unfortunately, the used library for image resizing (https://github.com/nfnt/resize) does not seem to support cropping.
The text was updated successfully, but these errors were encountered: