-
-
Notifications
You must be signed in to change notification settings - Fork 883
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
Include Blurhash in ImageDetails #5142
Comments
This is a wonderful idea. I see that pictrs has blurhash support, although it seems to be on its own dedicated endpoint. @asonix Would it be possible to return the blurhash with any of the details / image_details responses? If its a low-CPU operation, you probably wouldn't even need to add a setting for generating them, and just do it by default. If that's not doable, then we can probably use the existing endpoints, and store that. |
@dessalines Might need to do some testing on if it is indeed a low CPU operation. Obviously the CPU cost is not nothing. Just trade offs to consider there. Please let me know if there is anything I can do to help drive this forward. And I'd be happy to help test this eventually! |
Pictrs is the image library lemmy uses, and how we complete it depends on asonix's answer. I recently added an cc @MV-GH @SleeplessOne1917 as this would be great to eventually add to jerboa and lemmy-ui-leptos also. Seems like there are decoder libraries for blurhash in most languages. |
I think pict-rs could probably add blurhash to the image details. I'll look into that this weekend probably. |
I just merged the change in pict-rs that will include blurhash in the image details responses: https://git.asonix.dog/asonix/pict-rs/pulls/75 Not sure when I'll release another stable version, but it will have this included when I do. |
Sweet, thx! |
Requirements
Is your proposal related to a problem?
For users of a Lemmy client on slow internet connections not being able to see images while they are loading can lead to a subpar experience.
Describe the solution you'd like.
I'd love to see Lemmy return blurhash strings for images in the API. That way while images are loading for a client the client can temporarily display the blurhash of the image in place while it's loading.
Describe alternatives you've considered.
There aren't really any alternatives that I can think of here.
Additional context
I noticed that in 0.20.0 alpha it looks like there is a new ImageDetails object which is awesome and super helpful. Maybe a blurhash property could be added to that object?
The text was updated successfully, but these errors were encountered: