qdsfdhvh / compose-imageloader

Compose Image library for Kotlin Multiplatform.
https://qdsfdhvh.github.io/compose-imageloader/
MIT License
437 stars 15 forks source link

How to load image from uri or url, only in androidMain. #630

Closed muhammad-najam-cmp closed 3 weeks ago

muhammad-najam-cmp commented 3 weeks ago

I'm required to load image only in android main but it is not happening.

val painter = rememberImagePainter(url = path) Image( painter = painter, contentScale = ContentScale.Crop, contentDescription = path.substringAfterLast('/'), modifier = Modifier.fillMaxSize(),

            )

URI_LOG content://media/picker/0/com.android.providers.media.photopicker/media/1000000019 URI_LOG content://media/picker/0/com.android.providers.media.photopicker/media/1000000021

PATH_LOG /sdcard/.transforms/synthetic/picker/0/com.android.providers.media.photopicker/media/1000000019.mp4 PATH_LOG /sdcard/.transforms/synthetic/picker/0/com.android.providers.media.photopicker/media/1000000021.mp4

couldn't loading video thumb

qdsfdhvh commented 3 weeks ago

I will support it recently.

muhammad-najam-cmp commented 3 weeks ago

kindly make it like coil, that allowing uri, to load android local images. After updating kindly provide me the version

muhammad-najam-cmp commented 3 weeks ago

hi, have you done with your pull request with this enhancement? I've to fix issue in my product

qdsfdhvh commented 3 weeks ago

I'll post a version first later, the functionality should be supported, but at the moment remote video requests are easy to OOM.