Skip to content
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

Unable to display complete avatar #31990

Open
seepine opened this issue Sep 6, 2024 · 3 comments
Open

Unable to display complete avatar #31990

seepine opened this issue Sep 6, 2024 · 3 comments
Labels

Comments

@seepine
Copy link

seepine commented Sep 6, 2024

Description

Unable to display complete avatar, the avatar class of object-fit is contain.

GitHub can display the complete avatar because when GitHub changes the avatar, it must be cropped.

Maybe set the avatar class of object-fit : cover for the better.

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image image image image image

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

@silverwind
Copy link
Member

silverwind commented Sep 10, 2024

As per #31991 (review), I think contain is better because cover may crop non-square images incorrectly.

Proper solution will be to present the user a UI to crop the avatar image themselves before upload.

We should ensure that this future image cropping functionality can handle all supported formats like webp, so ideally a webp should upload as webp after cropping, but conversion to png may be acceptable as well.

@yp05327
Copy link
Contributor

yp05327 commented Sep 14, 2024

I prefer all avatars have same size, not based on the size of uploaded images.
Of cause, cropping image feature is needed, but it can not/ has no effect to the existing avatars.
So he want to fix these existing avatars, not the avatars user will upload in the future.
So even you added cropping image feature, I don't think this issue has been completely fixed.
Are there any other solutions instead of using cover?

@seepine
Copy link
Author

seepine commented Sep 25, 2024

I prefer all avatars have same size, not based on the size of uploaded images. Of cause, cropping image feature is needed, but it can not/ has no effect to the existing avatars. So he want to fix these existing avatars, not the avatars user will upload in the future. So even you added cropping image feature, I don't think this issue has been completely fixed. Are there any other solutions instead of using cover?

Yes I completely agree.

kerwin612 added a commit to kerwin612/gitea that referenced this issue Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants