Open froggy-jpg opened 1 month ago
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?
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
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
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
no i dont mean that, i mean when it fails to fetch the avatar set by the user we default it to something else
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
yeah and thats a good thing, having a default avatar would be better than having a blank square, it looks bad
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
you gotta take it up with our girlboss :nail_care: @ClaireRoush
i suggest we do it the same way we do as with the spinny frog @OlegSuperBro
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 77b9d7ae14459ed4bbb393ea49014da6a243f10f and 262577aee10cbe8472539554f1e8b27999a0169d)