react-native-avatar icon indicating copy to clipboard operation
react-native-avatar copied to clipboard

Support blurHash for progressive loading of image avatars

Open jabbots-contrib opened this issue 10 months ago β€’ 1 comments

It would be nice to give a progressive loading experience of a blurHash image prop. (This would also enable some nifty paywell blurhash blocks as well in certain apps.)

I would anticipate a blurHash prop on the ImageSourcePropType whereby I can provide a short blurHash string which transitions to the "real" image once the download is complete.

See the following repo for the image loader implementation: https://github.com/mrousavy/react-native-blurhash

jabbots-contrib avatar Jan 17 '26 14:01 jabbots-contrib

Hi @jabbots-contrib! Thanks for writing the issue. Your suggestion makes sense; however, I don’t want to include react-native-blurhash as a dependency or replicate its functionality, which means adding a blurHash prop isn’t an option. I believe a better way to achieve the desired functionality would be to add an onLoadEnd prop so you can pass a callback that will be triggered as soon as the avatar image is loaded. This callback would allow you to create a custom component that combines react-native-avatar and react-native-blurhash. Would that work for you?

kolking avatar Jan 18 '26 17:01 kolking