coil: [Coil 3] Local image files don't show on PC
Describe the bug
Hello!
Local image files don’t show on PC.
Error type is not in the function error()
To Reproduce
val platformContext = LocalPlatformContext.current
val uri = "file:///H:/1.png".toUri()
val request = ImageRequest.Builder(platformContext)
.data(uri)
.error {
println("error")
null
}.build()
AsyncImage(
model = request,
contentDescription = "",
contentScale = ContentScale.FillHeight,
modifier = Modifier.fillMaxSize()
)
Logs/Screenshots
Version Coil 3.0.0-alpha01
kotlin.version=1.9.21 agp.version=8.1.4 compose.version=1.5.11
About this issue
- Original URL
- State: open
- Created 6 months ago
- Comments: 24 (2 by maintainers)
Possible workaround to use normal windows path.
Create a custom fetcher:
Register it:
It’s just a subfolder of the working directory of my app, nothing special.