How it works on Glide but not on coil: mimeType is...
# compose
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
)
r
Because Glide supports retrieving stills from a video and Coild doesn't
f
Have you tried replacing
model = { media.mediaPath }
with
model = media.mediaPath
?
a
@fengdai i tried both but nothing works
f