pub-dev icon indicating copy to clipboard operation
pub-dev copied to clipboard

Avatar image fallback

Open JHubi1 opened this issue 8 months ago • 4 comments

So, my avatar image has been bugged for many months now. This is likely an issue related to my Google account that's not worth getting into, though. This is not device specific and also occurs on mobile.

Chrome's Dev Tools don't show any request for a profile image anywhere, so I can't provide any helpful information regarding a failed request.

It would be nice to show a blank avatar or sth, so I don't have to deal with the shifted menus anymore. And also maybe set the aspect ratio for the avatar object to 1/1 just in case

screenshot

JHubi1 avatar Mar 22 '25 20:03 JHubi1

@JHubi1: Could you please provide more details? E.g. what the issue about the account was, or what the account URL / <img> element is?

isoos avatar Mar 24 '25 08:03 isoos

After a bit more digging, I noticed the image not actually being an <img> tag, but an <input type="img"> one, so basically a button with an image. The reason the avatar is displayed like that is the src attribute being empty.

Source code

This is also not countered during runtime. The src attribute stays empty.

Processed code in dev tools

This is a server side rendering issue, I believe

JHubi1 avatar Mar 28 '25 06:03 JHubi1

When adding a new avatar src image, it is shown as normal.

Normal

So maybe ensure that src attribute is never empty? And if it is, use a fallback image instead

JHubi1 avatar Mar 28 '25 06:03 JHubi1

@JHubi1: Since other accounts seem to be working, and the image URL is coming from the Google authentication service, I'm wondering what specific difference your account may have. What kind of image did you use there? Did you change it? Did the account have any restrictions in the past?

isoos avatar Mar 28 '25 08:03 isoos

Without additional information we're not able to resolve this issue. Feel free to add more info or respond to any questions above and we can reopen the case. Thanks for your contribution!

github-actions[bot] avatar Apr 18 '25 08:04 github-actions[bot]