CDNImageInterceptor

class CDNImageInterceptor(cdn: CDN) : Interceptor

A Coil Interceptor that intercepts image requests and applies CDN transformations.

The interceptor calls CDN.imageRequest to obtain a potentially modified URL and additional headers. CDN headers take precedence over any headers already present on the request (e.g. from io.getstream.chat.android.ui.common.helper.ImageHeadersProvider), overriding them for the same key.

Only HTTP/HTTPS URLs are intercepted; local resources, content URIs, etc. pass through unchanged.

Constructors

Link copied to clipboard
constructor(cdn: CDN)

Functions

Link copied to clipboard
open suspend override fun intercept(chain: Interceptor.Chain): ImageResult