Add dependency coil extension,
implementation("io.coil-kt.coil3:coil-gif:3.0.4")
val imageLoader = ImageLoader.Builder(context)
.components {
if (SDK_INT >= 28) {
add(AnimatedImageDecoder.Factory())
} else {
add(GifDecoder.Factory())
}
}
.build()