gabboman / wafrn

Wafrn is a federated social media inspired by tumblr. Join us and have fun
https://app.wafrn.net/dashboard/exploreLocal
GNU Affero General Public License v3.0
127 stars 38 forks source link

[FRONTEND] If media includes width, height and or blurhash, display blurhash of image while loads, and use width/height data for the space the image is going to take #119

Open gabboman opened 1 month ago

gabboman commented 1 month ago

As the title says. Some images will include a blurhash on the data, would be cool to use it.

Please bear in mind the size of the container for this, as is more interesting to "yep this is how much the image is gona take", to avoid layout shifts.

gabboman commented 1 month ago

This would be on the wafrnmediacomponent btw

ghost commented 1 month ago

I can work on it, I am new to this by the way

gabboman commented 1 month ago

Hello @8tool

The thing is in this component https://github.com/gabboman/wafrn/tree/main/packages/frontend/src/app/components/wafrn-media

You will need to get the current width of the div that will hold the media, and calculate the height based on it

Thanks a lot!