Skip to content

SVGs

To add SVG support, import the extension library:

implementation("io.coil-kt:coil-svg:0.8.0")

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

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

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