Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src/main
.gitignore
README.md
build.gradle.kts
gradle.properties

README.md

Gifs

Unlike Glide, GIFs are not supported by default. However, Coil has an extension library to support them.

To add GIF support, import the extension library:

implementation("io.coil-kt:coil-gif:0.7.0")

And add the decoder to your component registry when constructing your ImageLoader:

val imageLoader = ImageLoader(context) {
    componentRegistry {
        add(GifDecoder())
    }
}

!!! Note coil-gif also includes an ImageDecoderDecoder, which is backed by Android P's new ImageDecoder API. However, it is not currently recommended to use ImageDecoderDecoder due to a bug in the Android framework. You can track the status of the bug here.

And that's it! The ImageLoader will automatically detect any GIFs using their file headers and decode them correctly.

You can’t perform that action at this time.