I am rendering a simple Image in Jetpack Compose. ...
# compose
i
I am rendering a simple Image in Jetpack Compose.
Copy code
Image(
    painter = rememberImagePainter(imageUrl),
    contentDescription = "Header Image",
    modifier = Modifier.height(200.dp)
)
I am getting the below error --- Failed to create image decoder with message 'unimplemented'
I have verified that image url is correct. I used a random image from unsplash
k
What is the format of the image? Having it render in a browser is no guarantee that this particular format is supported by Compose.
i
It is joeg
k
What is the URL?
i
Any image from unsplash
k
It might not be of an image itself, but some sort of a redirect to a full web page by Unsplash
i
I tried hosting inages on gdrive as well as github as well s3
Same everywhere
If i move image into drawable it works
k
What is
rememberImagePainter
?
Doesn’t look like it works on URLs
Is that from Coil?
i
Yes
As per docs it should work
A similar unanswered question in Stackoverflow as well. It is the same as mine
I believe some library version is causing the issue
k
Try Coil 2, and if that doesn’t work, file a bug on them with a full sample
i
Okay
549 Views