Embed image blurhash support
Blurhash (https://blurha.sh/) is a "compact representation of a placeholder for an image".
Basically it gives a blurred "image preview" generated by the server. This is used to prevent blank loading screens.
The way a typical blurhash implementation works is:
The server sends the client a URL (final image) and a string (the blurhash).
The client receives these items, the blurhash is decoded and pushed to the client and starts loading the image.
Once the image is done loading, the client will replace the blurhash with the final image.
Right now when an image is attached to a discord embed, the embed first appears to be empty and then an image pops into place.
If you can attach a blurhash, the end-user will have something to look at while the image is loading. While the way it is done right now works, it's just plain ugly.
The blurhash will keep the embed's size in order and "nicen" the final UI/UX overall.
Currently there is an encoder and decoder in TypeScript linked in their GitHub page along with documentation on how blurhash works.
Overall I think this could be a very useful UX update and can be useful beyond the scope of embed images (e.g. Server banners, icons, regular attachments, etc.)
Thanks for considering.
EDIT: grammar, always grammar
-
Most of the waiting time for an image to load in is because discord's image proxy is fetching it, in which case it doesn't get have the image itsself so it can't generate a blurhash
0 -
I was thinking you provide the blurhash yourself, I'm sorry if that wasn't clear.
0
โปรด ลงชื่อเข้าใช้ เพื่อแสดงข้อคิดเห็น
ข้อคิดเห็น
2 ข้อคิดเห็น