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

fix: account avatar should not be streched #3165

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

Cl0v1s
Copy link
Contributor

@Cl0v1s Cl0v1s commented Jan 30, 2025

Account avatar are stretched instead of being centered and cropped both on profile page and avatar in status

Before
image

After
image

Copy link

netlify bot commented Jan 30, 2025

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit 0e8f455
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/679bf3540683350008e83071

Copy link

netlify bot commented Jan 30, 2025

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 0e8f455
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/679bf3547a66960008c97bfe
😎 Deploy Preview https://deploy-preview-3165--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shuuji3
Copy link
Member

shuuji3 commented Jan 31, 2025

@Cl0v1s I think your fix looks correct and I can merge this. But when I tried to replicate the issue like "before" screenshot, I couldn't find the same issue with the same account on my side.

For example, this preview (from PR 3164) doesn't have this fix but it shows the profile icon correctly: https://deploy-preview-3164--elk-zone.netlify.app/universeodon.com/@[email protected]

I also checked main.elk.zone but the same result: https://main.elk.zone/m.webtoo.ls/@[email protected]

Do you know any other profile with the same issue I can check?

@shuuji3
Copy link
Member

shuuji3 commented Jan 31, 2025

It seems that the Mastodon server crops and caches the original profile image on their server, and the Mastodon API returns that cache data to Elk if the account is logged in to the Mastodon server.

So with this change, Elk can crop the image on the client-side in the same way as Mastodon server, in case the server is non-Mastodon and returns a non-square image.

@shuuji3 shuuji3 added this pull request to the merge queue Jan 31, 2025
Merged via the queue into elk-zone:main with commit 5c38c91 Jan 31, 2025
13 checks passed
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