Questions tagged [coil]

For questions about the Coil Android library, not generic coils

Coil is a fast, lightweight, easy to use and modern image loading library for Android backed by Kotlin Coroutines.
Coil is an acronym for: Coroutine Image Loader.
The library is currently developed and manteined by Instacart, and is under the Apache License, Version 2.0.

References

148 questions
0
votes
1 answer

Get loaded picture URL from Coil

I have a question about getting the loaded picture URL from Coil. The reason why is because I'm using https://unsplash.it/200/200 to get a random image URL which will become something like Image URL, so how can I get the second URL when the image is…
0
votes
1 answer

Coil AsyncImage not resolving

I have not been able to get Coil to resolve for me. I've added the implementation to my gradle implementation('io.coil-kt:coil:2.2.2') I've added import coil.* and I've tried import coil.compose.AsyncImage and neither have proven to be successful.
Robert
  • 809
  • 3
  • 10
  • 19
0
votes
1 answer

How to make all images from API be in one size in Jetpack Compose?

I have the following composable that represents a list model - @Composable fun DashboardCard( modifier: Modifier = Modifier, model: DashboardCardModel, onCardClicked: (model: DashboardCardModel) -> Unit ) { Column( modifier…
Alon Shlider
  • 1,187
  • 1
  • 16
  • 46
0
votes
0 answers

Coil: Load image to push notification

I am trying to load an image to a push notification using Glide val imageLoader = ImageLoader(this) val request = ImageRequest.Builder(this) .data(data.user_avatar_url?.replace(URL)) .target( …
Ashwin Nirmale
  • 443
  • 4
  • 13
0
votes
1 answer

Jetpack compose not showing bitmap image for very high quality image

When image bitmap is low quality I am able to load and display the image with coil but when image bitmap is very high quality the screen doesn't show anything and pressing back lets to crash the app. I tried bitmap instead the painter but same…
0
votes
0 answers

How to create custom VideoFrameDecoder for coil image library in compose

I'm using this solution to load video frame from network url in jetpack compose. However, I want to use coil's video support and implement VideoFrameDecoder as my AWS S3 url here does not contain file extension. How can i do it?
Annon
  • 633
  • 7
  • 26
0
votes
1 answer

Pymodbus: write_coil also writes in discrete input register?

I have a question regarding the pymodbus module and its functionality. My server works just fine, as well as the implemented datastore, I guess. Here is the code for my server and datastore: import asyncio from pymodbus.datastore import…
Martin
  • 11
  • 2
0
votes
0 answers

Using placeholder in Coil when the url is null

I get some data from database and push it to reciclerview. I use Coil to show images. But there are some urls that are null and I need to use some placeholder in such cases. I tried all the option I saw in the internet but nothing…
Alex20280
  • 97
  • 6
0
votes
1 answer

How to to check if Coil ImageRequest is complete before returning the bitmap value

I'm trying to return the bitmap value from a lambda function but I get the error: lateinit property bitmap has not been initialized ... Is there a way to check if the ImageRequest is complete before returning the bitmap? fun…
Sky
  • 127
  • 9
0
votes
2 answers

Set modifier height width to coil Image or AsyncImage and scal the image loaded from url

I'm using coil library to load images in my composable view and I want to define fix height and width for my coil Image composable, however the modifier is missing in the coil Image composable class, following is the code snippet I'm…
HAXM
  • 3,578
  • 4
  • 31
  • 38
0
votes
1 answer

Jetpack Compose - UI Test Coil Fetched Image

I have a custom Image composable that uses Coil's rememberAsyncImagePainter. However, I have another component that uses resources and has logic that is handled separately. I successfully render the custom resource placeholder, however I'm not sure…
Jüri Kiin
  • 744
  • 7
  • 23
0
votes
1 answer

Use Coil in compose to preload and later display images

I've been going around in circles trying to figure out how to use Coil within Compose. I want to preload the images so there won't be any lag in my UI. I read that COIL has a cache. This answer seems to imply that I can create an ImageRequest with…
0
votes
1 answer

Transform image loaded by url according to it's color

I'm loading image by url to ImageView using coil. val request = ImageRequest.Builder(context) .data(imageUrl) .allowHardware(false) .size(Size.ORIGINAL) …
E I
  • 501
  • 4
  • 13
0
votes
1 answer

How to set am image using AsyncImage when getting data from Firebase?

I have a repository class, where I create a Firestore call to get an image URL: override suspend fun getImageUrl() = flow { try { emit(Response.Loading) val imageUrl = ref.document(id).get().await().getString("imageUrl") …
Joan P.
  • 2,368
  • 6
  • 30
  • 63
0
votes
1 answer

Why doest a temp image keep to display when I use ImagePainter.State.Success in Compose?

The following Code A is from the official sample project. I think Code A is wrong, I think there are two Images in the line, the left image is a real image which is displayed when it has been loaded, and the right image is a temp image which is…
HelloCW
  • 843
  • 22
  • 125
  • 310
1 2 3
9
10