User image is blurry on high dpi device #1479
Labels
No Label
dependencies
duplicate
help wanted
invalid
kind/bug
kind/feature
needs reproduction
question
security
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/vikunja#1479
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reason
So that it isn't blurry on high dpi devices, like mobile.
Related: Where do we know where to pick those two letters we use from the name?
It's only picking the first letter of the username.
The generation happens here: https://kolaente.dev/vikunja/api/src/branch/main/pkg/modules/avatar/initials/initials.go#L138-L141
Ahh that's good!
I think I'll reimplement that with a vue component in the frontend.
I think we should keep doing that in the api. Right now all avatar logic is built in the api so that the frontend only needs to show whatever avatar it is given by the api.
(It is completely possible to generate svg avatars in go, we already do that with the marble avatar option)
My idea for the component was to reduce dependency on server (now that I think of it will probably introduce a dependency which is actually worse), reduce download bandwidth (I know also insignificant), but mostly remove blurriness. The latter is really annoying on highdpi. Any way to support highdpi for the avatars?
Exactly…
There's a
size
parameter which lets the frontend request avatars in different sizes. We could let the frontend load avatars in a higher resolution, then only need a way to detect a hdpi monitor to avoid the higher bandwidth on non-hdpi monitors.Using
srcset
that's not even necessary, because the browser would do this on its own.Even better 👍
Create user image as SVG insteadto User image is blurry on high dpi device