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
37
votes
1 answer

Laggy Lazy Column Android Compose

I've created a whole app in Jetpack Compose. However, the performances on the Lazy Column are pretty bad and it does not make any sense. Lazy Column should be the substitution of RecyclerView, but RecyclerView works much better at the moment. I made…
19
votes
1 answer

How to get bitmap from URL using Coil?

I want to load a bitmap from URL and then use palette API to get some colors from that. On the documentation page, I cannot find the code for getting bitmap directly! Can anyone help me out?
Chintan Parmar
  • 2,375
  • 2
  • 12
  • 22
15
votes
3 answers

How to load remote SVG image using Coil in Jetpack Compose

I'm failing to load this image in Image using Coil in Jetpack Compose
15
votes
4 answers

Auto Height Jetpack Compose Coil Image

I am trying to show an image with fill width and auto height using Jetpack Compose Coil. I want the image to take the full width and auto height. But the image only showing when I specify a fixed height. Image( painter = rememberImagePainter( …
Jeeva
  • 3,975
  • 3
  • 23
  • 47
14
votes
3 answers

Coil don't load image in emulator with Jetpack Compose

I need to show an image in my app by url using Coil, but this image don't load. I follow the official documentation https://coil-kt.github.io/coil/compose/. profile card implementation "io.coil-kt:coil-compose:1.3.1" @Composable fun…
Gustavo Faria
  • 181
  • 2
  • 6
10
votes
5 answers

Showing a Progress bar while loading image using Coil?

How to show a progress bar while fetching image from URL in Coil.?
Unaisul Hadi
  • 620
  • 1
  • 7
  • 22
9
votes
3 answers

How to set an image URL as error placeholder on Coil in Jetpack Compose

Coil accepts a drawable resource as an error placeholder. Is there a way to use an image URL here instead? Here is the code I am working on: // Global variables var currentlySelectedImageUri = mutableStateOf(null) var previousImageUri: Uri? =…
Raw Hasan
  • 1,096
  • 1
  • 9
  • 25
9
votes
4 answers

Coil ImageView doesn't fit exactly

According to Coils docs, I don't have to make any configuration for my image to fit(). The problem is, that the ImageView is not loading correctly: This is my configuration for the ImageView with Picasso:…
coroutineDispatcher
  • 7,718
  • 6
  • 30
  • 58
8
votes
7 answers

PainterResource throws IllegalArgumentException: Only VectorDrawables and rasterized asset types are supported

I am working on a Jetpack Project which downloads an image from API using Coil Library. I have confirmed that valid image URLs and related data are being returned from the API call successfully. I am able to view the image on my browser using the…
Tonnie
  • 4,865
  • 3
  • 34
  • 50
7
votes
3 answers

Coil rememberAsyncImagePainter states are not updated

I use Coil along with Compose. And I'm trying to make a shimmer animation while the image is loading. All examples use ImagePainter with ImagePainter.State and it works correctly, but this is now marked as "deprecated". That's why I chose…
qveex
  • 73
  • 1
  • 5
7
votes
2 answers

How to preload Coil image in Compose?

I have a pager (Accompanist) with image that are get from web with Coil in Compose. The rememberPainter() seem to only call the request when the Image composable is shown for the first time. So when I slide page in the pager, the Image show only at…
Melio500
  • 309
  • 3
  • 9
7
votes
3 answers

How to load Image Files into Jetpack Compose Image using Coil

I would like to load saved image on cache into Image of Jetpack Compose using Coil. I searched in stackoverflow but all suggested ways are for loading web urls. I know that It's possible to convert image file to bitmap and then pass it to Coil but…
Vahid
  • 1,588
  • 4
  • 22
  • 34
7
votes
1 answer

How do I create a Jetpack Compose Image that resizes automatically based on a remotely loaded image size?

I would like to display an image with the following rules: The image is remote and needs to load on runtime. We don't know what the image size is until it's loaded. The Image view should take the full width of the parent, and it should…
Eugene
  • 3,417
  • 5
  • 25
  • 49
6
votes
1 answer

Add a shimmer while loading an image using coil and compose

Loading an image from a web URL and displaying a shimmer during load. Are there any better ways to handle this? val context = LocalContext.current val imageLoader = ImageLoader(context) val request = ImageRequest.Builder(context) …
svg
  • 114
  • 1
  • 8
6
votes
3 answers

How can I get a new image not cached in android coil?

I am developing an android app using the Jetpack Compose with Coil ImageLoader library. It shows a user's profile image. I receive the profile data from the API. GET: /users/{userId} The response contains userId and profileImgKey. For the user…
yoonhok
  • 2,575
  • 2
  • 30
  • 58
1
2 3
9 10