Hi, this may be more of a coil question, but has a...
# compose
n
Hi, this may be more of a coil question, but has anyone noticed that static gifs (not animated) don’t load with the coil image loader? This only seems to be for API > 28, lower than this and the image loads . I’ve tried using the imageLoader for gifs as well as shown here: https://coil-kt.github.io/coil/gifs/ and get the same results. An example static gif can be found here:

https://d30v2pzvrfyzpo.cloudfront.net/uk/images/restaurants/106512.gif

👍 1
t
Copy code
val imageLoader = ImageLoader.Builder(context)
    .componentRegistry {
        if (SDK_INT >= 28) {
            add(ImageDecoderDecoder(context))
        } else {
            add(GifDecoder())
        }
    }
    .build()
👍 1
n
@Tijs Gobbens Thanks for the reply. Yes I tried that. An animated gif I found on the web worked, but the static gif I included above did not show any image for API > 28.
t
just tried that image in an emulator, it did render correct:( could it be device specific issue?
n
It will work for devices with API < 28 but not above, could I ask what version of android your emulator was running?
I’ve tried it on several devices and emulators running different versions of android it seems that below API 28 the static gif will load, but above this it will not.
t
i’ve tried on a emulatir pixel3a API 30 and real pixel 3a api 31
n
ok thanks, maybe something I’ve done? Not sure what?
Added a Debug logger to coil and figured it out it’s down to the fact that the URL is http and not secure: CLEARTEXT communication not permitted by network security policy
👍 1
Which applies to devices with API > 28
without the logging it fails silently