Is it possible to load network images in the compo...
# compose
b
Is it possible to load network images in the compose preview?
n
I’m thinking no. I wasn’t able to get it to load so instead had it show a placeholder image in preview mode.
Copy code
if (LocalInspectionMode.current || state !is ImagePainter.State.Empty ) {
    placeholder()
}
b
that is sad, but thanks for the little workaround for placeholders in preview mode
n
I should say that I remember it working when you deploy the preview to device. I just had issues when using Preview in android studio (which is where its most useful for me).
c
The preview in Android Studio doesn't (generally) have access to the network, so no way to load images.