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
0 answers

Trouble adding gifs to jetpack compose using coil

I am new to jetpack compose and I found a way to add a gif to my app using coil but a lot of the code I found seem outdated and not working anymore and I can't find any other useful information . I don't know what to do to make it work. I found this…
0
votes
1 answer

Error in JetPack Compose when trying to load screen

I have a categories screen that I am trying to load but when attempting to do so, I get the following error message "FATAL EXCEPTION: main Process: com.example.newsapp, PID: 4645 Java.lang.IllegalArgumentException: Wrong source was used:…
asd
  • 13
  • 4
0
votes
1 answer

BackdropScaffold backLayerContent image content scale issue

I have a Compose Screen with BackdropScaffold and with AsyncImage in backLayerContent, so when I open the Screen the first time, the scale of the image works weird, like in Screenshot1. And when I reopen the Screen, the image is placed correctly, as…
0
votes
0 answers

Svg icon not shown in release apk with R8 enabled

here is my implementation: //coil image implementation 'io.coil-kt:coil-compose:2.4.0' implementation 'io.coil-kt:coil-svg:2.4.0' implementation 'io.coil-kt:coil-gif:2.4.0' @composable fun SvgImage( svgLink: String, modifier: Modifier =…
0
votes
1 answer

Coil Image Loader is not working. The picture is not coming

I am trying to fetch image from url using Coil Image Loader but it is not working. I tried the code on Coil's own site, but it didn't work. First I get the drawable with the code block below. val request = ImageRequest.Builder(context) …
0
votes
1 answer

android compose onclick asyncimage one URL returns random picture when URL is again called

Like in title said I need to update picture when got same URL, this URL whenever is called returns random picture. Got code that is working when URL is diferent: var model by remember { mutableStateOf(URL) } AsyncImage( model = model, …
acakojic
  • 306
  • 2
  • 11
0
votes
1 answer

android compose onclick asyncimage change picture

Like title said it needs to update image with new picture in Android Compose, using Coil. AsyncImage( model = URL, contentDescription = "", modifier = Modifier.clickable(onClick = { //Maybe here to add code? …
acakojic
  • 306
  • 2
  • 11
0
votes
0 answers

What influence the image clarity loaded from disk in android?

In the items of my app, they all contains a snapshot of the screen. When loading those items, I found the snapshot very blurry. It doesn't make sense since I didn't compress the image. Then, I did a test. I obtained the saved image and display it…
Ruineie
  • 23
  • 4
0
votes
0 answers

Coil, Fresco and Glide can't decode jpeg image due to unknown image format

I tried to use Coil, Glide and Fresco in Jetpack Compose to load and show image but got an error due to decoding Firstly i checked Coil and got next error: java.lang.IllegalStateException: BitmapFactory returned a null bitmap. Often this means…
0
votes
0 answers

Expected start of the array '[', but had 'EOF' instead at path

I am learning to use apis in android and I am trying to get a list of images from the Dog Ceo api. I am using the kotlin serialization, coil and retrofit library. The Json response looks like this (Note: I've shortened the list because it's so…
0
votes
1 answer

How to Display video thumbnail for videos from local storage of Phone in jetpack compose using Coil

How to Display video thumbnail for videos from local storage of Phone in jetpack compose using Coil I am trying this code val painter = rememberAsyncImagePainter( model = ImageRequest.Builder(LocalContext.current) …
1234567
  • 2,226
  • 4
  • 24
  • 69
0
votes
1 answer

How to show video thumbnail using Coil in compose

I am trying this code to show video thumbnail from the Phone Where video.uri = ContentUris.withAppendedId(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, cursor.getColumnIndexOrThrow(MediaStore.Video.Media._ID).tolong()) val painter =…
1234567
  • 2,226
  • 4
  • 24
  • 69
0
votes
0 answers

Using CoilImage in Jetpack Compose, how can I remove the top and bottom padding after the image is downloaded

I have a simple CoilImage implementation in my project where I download an image through an url, and then proceed to move the image state into an Image Composable. That's going smooth so far, but I'm facing a small problem where undesirable paddings…
0
votes
0 answers

Show image with Coil and Uri in Android

I want to show picture with Coil from Uri. Following code shows picture but when I choose one. I want to store Uri and when Screen starts i want to show it immediately. val uri =…
Equlo
  • 115
  • 10
0
votes
0 answers

Usage of Coil inside accompanist HorizontalPager

I need to create a HorizontalPager with images from server. I'm using Coil 2.2.2 and everything is fine when I open the app a second time (because of the cache). But when I open the app for the first time (or after clearing the cache), the download…
tasjapr
  • 632
  • 4
  • 13