`_AsyncImage_(` `model = "<https://i.insider.c...
# multiplatform
s
_AsyncImage_(
model = "<https://i.insider.com/600b6a6a195820001155497a?width=700>",
contentDescription = null,
modifier = Modifier
._padding_(horizontal = 5._dp_)
._width_(if (isCompact) 60._dp_ else 80._dp_)
._height_(if (isCompact) 60._dp_ else 80._dp_)
._fillMaxSize_()
._clip_(_RoundedCornerShape_(_CornerSize_(16._dp_)))
._combinedClickable_ *{*
bottomSheetNavigator.show(UserProfileScreen(user))
*}*,
contentScale = ContentScale.Crop
)
coil3 AsyncImage is not downloading the image, saying:
Unable to create a fetcher that supports:
j
I think model need to be
ImageRequest.Builder().data("https://...").build()
s
I changed but the result is the same
Its correct. However also need LocalPlatformContext if multiplatform In constructor of image request builder.
s
Screenshot 2024-01-31 at 22.54.32.png
j
Why are you sending fetcherDispatcher as model? 🙂
s
it was experiment, but result is the same
j
Hmm right your url doesnt have file extension so gets confused I think. Does it use redirect or such?
s
no it is simple image
j
s
Screenshot 2024-01-31 at 23.03.06.png
j
I think should be network-ktor or network-okhttp
s
hmm, let me check
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find io.coil-kt.coil3:coil-network-ktor:3.0.0-alpha01.
got an error now
j
Sorry if using alpha03 it exists: See changelogs https://github.com/coil-kt/coil/blob/main/CHANGELOG.md
If that doesnt work I dont know. It works doing exactly that here in my app with coil 3.0 alpha03.
s
The reason was that I didn't have ktor in my project, I was using firebase only/
k
@Sevak Tadevosyan is that solved ? facing same issue
cc @Nitesh Malviya @Mandeep
120 Views