How it works on Glide but not on coil: mimeType is...
# android
a
How it works on Glide but not on coil: mimeType is video/mp4
Copy code
GlideImage(
    model = media.mediaPath, contentDescription = stringResource(id = R.string.thumbnail),
    modifier = Modifier
        .fillMaxWidth()
        .aspectRatio(1f),
    contentScale = ContentScale.Crop,
)

AsyncImage(
    model = { media.mediaPath },
    contentDescription = stringResource(id = R.string.thumbnail),
    placeholder = painterResource(id = R.drawable.ic_default_thumbnail),
    error = painterResource(id = R.drawable.ic_default_thumbnail),
    modifier = Modifier
        .fillMaxWidth()
        .aspectRatio(1f),
    contentScale = ContentScale.Crop
)
đź§µ 2
c
Does the image not show? Do you get anything in
onError
?
@Asad Mukhtar It looks like you’re passing a closure of the video path instead of the actual path:
model = { media.mediaPath }
should be
model = media.mediaPath
a
@Colin White thanks, I fixed the issue