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
1
vote
1 answer

nested recyclerview using paging adapter (paging 3) show wrong image after scrolling

How to solve the child adapter image that changes and show wrong images after scrolling? this is my code Parent Data Class data class Review( val author: String, val date: String, val rating: Float, val comment: String, val images:…
1
vote
1 answer

Using Coil library - imageView.draw(canvas) - Software rendering doesn't support hardware bitmaps

This occur when try to draw canvas from imageView which using Coil to load image. Could you help me solve problem? Thank you all fun loadImageFromUrl() { bodyImageView?.load(imagePathServer) } This is code for draw bitmap from…
Duong.Nguyen
  • 373
  • 3
  • 13
1
vote
1 answer

Image Caching With Anroid Libraries

My app is getting a list of movie objects, which includes a movie poster url, and it's displaying those posters and titles, then when a user clicks on that movie, it goes to a movie detail activity, that also has the poster and title, along with…
Paxana Non Grata
  • 379
  • 1
  • 7
  • 23
1
vote
2 answers

Problem with importing Coil into application

I want to import Coil library in my project. I did it like below: android{ compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } …
Ehsan
  • 2,676
  • 6
  • 29
  • 56
0
votes
0 answers

jetpack compose - How do I cache signed URL from Cloudfront using Coil library

Usecase: I have a specific use-case, where I have to load signed URL from Cloudfront very frequently. Signed Cloudfront URL looks something like this: /?Expires=1692731643&Signature=sT-BagXsZkUnw.... Since this image file is…
Shailesh
  • 367
  • 1
  • 5
  • 15
0
votes
1 answer

Gif loading in LazyColum using io.coil-k, During recompose it does not load gif immediately

Below is my configuration for the coil imaging loader for the gif loading. val imageLoader = ImageLoader.Builder(context). memoryCachePolicy(CachePolicy.ENABLED). diskCachePolicy(CachePolicy.ENABLED) .components { …
Herry
  • 7,037
  • 7
  • 50
  • 80
0
votes
3 answers

How to show image (Bitmap) in compose with glide, coil

I want to insert a picture into my composable GlideImage or CoilImage or Image. I get a picture depending on the conditions from resources/drawable (image.jpg) or from mobile galery(Uri). For Image(){} I decode my image to bitmap. How to use bitmap…
0
votes
2 answers

Pause image loading in coil onscroll in lazycolumn in jetpack compose android

Pause image loading in coil onscroll in lazycolumn in jetpack compose android We are using Coil to load images with jetpack compose , earlier in glide with recylerview or other lists we had the option to pause loading images when we scrolled , it…
0
votes
1 answer

How does one display a RawRes in a compose image?

This probably is covered somewhere, but I was unable to find it in the docs / on SO, so I decided to ask: I've tried this: @Composable fun RawImage( modifier: Modifier = Modifier, @RawRes resource: Int, contentDescription: String? =…
JustSightseeing
  • 1,460
  • 3
  • 17
  • 37
0
votes
0 answers

Incorrect pixel offset of the graphicsLayer on different devices on Jetpack Compose and Coil

I have an UHD png image and display it on the screen using a coil AsyncImage. AsyncImage is in the Box composable. Also there is a Button in the Box and I place it over the AsyncImage with graphicsLayer modifier. The offset is 200px along x axis and…
0
votes
1 answer

Applying tint colour on an SVG loaded with Coil Compose Android

I'm trying to apply a tint colour using Compose, Coil 2.4 with SVG extension, but it does not really work. SubcomposeAsyncImage( model = ImageRequest.Builder(LocalContext.current) …
Peter Szucs
  • 1,116
  • 9
  • 18
0
votes
1 answer

Coil: display a new image that has the same name and path as the previous image

In my app, the user selects an image from the gallery by clicking a button. After that, he can select another image from the gallery by pressing the button again, and the new image will replace the previous one. But the point is that the selected…
0
votes
0 answers

Getting blurry image using coil image library

Using paint( painter = rememberAsyncImagePainter(Note.getBackgroundImages()[note.selectedBackgroundImageIndex]), contentScale = ContentScale.Crop ) Image is blurry but application…
Ayush Singhal
  • 21
  • 1
  • 3
0
votes
1 answer

Unable to load image using Coil from content URI

I am trying to load an image who's (mimeType is video/mp4) using coil in my Android app from a content URI. Here is the code snippet I am using: val mediaPath = "content://media/external/file/252819" // its mimeType is video/mp4 AsyncImage( …
0
votes
0 answers

Android Share image from Url using Coil

My app is using Coil to load the image from external URL, when Coil loads the image I want to add option to share this image, but I do not want to ask the user for any permissions (a bit of overkill to ask for storage permission to share image), is…