Hi everyone, I'm using Coil to load images in my Compose Multiplatform project (CMP).
I'm encountering the following error when trying to load .jpg files, even though they are placed in the correct directory:
Caused by: org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: composeResources/e_shopping.composeapp.generated.resources/drawable/pexels_pixabay_247599.jpg
Interestingly, when I switched to .png files, everything works fine.
Has anyone else experienced this with .jpg files in CMP resources?
👀 2
p
Pranathi
05/20/2025, 8:45 AM
Why don't you use Image(painter = painterResource(Res.drawable.xxxxxx), contentDescription = "") from compose foundation
p
Prakash Irom
05/20/2025, 8:48 AM
I used Image(painter = painterResource(Res.drawable.xxxxxx), contentDescription = "") before but it takes time to load the image that's why I chose to use Coil.