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

add a default avatar to display when there is none #68

Open
froggy-jpg opened this issue Oct 24, 2024 · 11 comments
Open

add a default avatar to display when there is none #68

froggy-jpg opened this issue Oct 24, 2024 · 11 comments
Labels
🌐 frontend Something in browser 🟠 priority: medium ✨ enhancement New feature or request

Comments

@froggy-jpg
Copy link
Collaborator

No description provided.

@froggy-jpg froggy-jpg added ✨ enhancement New feature or request 🌐 frontend Something in browser 🟠 priority: medium labels Oct 24, 2024
@OlegSuperBro
Copy link
Collaborator

it actually exist already, but only on new users. In backend models, user model we have this line
userAvatar: { type: String, default: "/static/images/default_user_avatar.png", required: false },
it don't work if user didn't had avatar before update (update commits 77b9d7a and 262577a)

@froggy-jpg
Copy link
Collaborator Author

i see. does that work as a fallback avatar when the user specified one doesnt load or is it only displayed when user didnt specify an avatar?

@OlegSuperBro
Copy link
Collaborator

it works only if user didn't changed avatar after registration. I think we need add image check on frontend and backend to not allow users set empty avatar value

@froggy-jpg
Copy link
Collaborator Author

froggy-jpg commented Oct 30, 2024

yeah that what i meant to say, i think it would be good to have a fallback avatar because empty ones when an avatar failes to load look out of place and weird

@OlegSuperBro
Copy link
Collaborator

don't we have to don't allow setting avatar to nothing on frontend? Right now we don't have too much users, we can run script to set default avatar for everyone who don't have it/is deleted

@froggy-jpg
Copy link
Collaborator Author

no i dont mean that, i mean when it fails to fetch the avatar set by the user we default it to something else

@OlegSuperBro
Copy link
Collaborator

I don't think it's a good idea. For the user it can look weird. Just imagine if you just uploaded your new avatar but it's just not saved at the backend for some reason. You will see like you have set an avatar, but it displays the default one because the database has a record for the new avatar but the file doesn't exist. IMHO we should just set the default avatar for everyone who doesn't have it and implement things that prevents any way to set empty avatar

@froggy-jpg
Copy link
Collaborator Author

yeah and thats a good thing, having a default avatar would be better than having a blank square, it looks bad

@OlegSuperBro
Copy link
Collaborator

i'm thinking about it. Why are images stored as full urls and not just filenames? i think this requires rewriting how image file saved and db records written

@froggy-jpg
Copy link
Collaborator Author

froggy-jpg commented Oct 31, 2024

you gotta take it up with our girlboss 💅 @ClaireRoush

@froggy-jpg
Copy link
Collaborator Author

i suggest we do it the same way we do as with the spinny frog @OlegSuperBro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌐 frontend Something in browser 🟠 priority: medium ✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants