Package 

Class StreamImageLoaderFactory

  • All Implemented Interfaces:
    coil3.SingletonImageLoader.Factory

    
    public final class StreamImageLoaderFactory
     implements SingletonImageLoader.Factory
                        

    Factory for creating Coil ImageLoader instances with Stream Chat specific configuration.

    This factory configures:

    • Memory cache with 25% of available memory

    • Disk cache using FileCacheManager's Coil cache directory (2% of disk space)

    • OkHttp with cache control and optimized network dispatcher

    • Support for GIFs, animated images, and video frames

    • Method Summary

      Modifier and Type Method Description
      ImageLoader )>newImageLoader(<ERROR CLASS> context)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StreamImageLoaderFactory

        StreamImageLoaderFactory(List<Interceptor> interceptors, Function1<ImageLoader.Builder, Unit> builder)
        Creates a StreamImageLoaderFactory with additional Interceptors prepended to the component registry, before any decoders and before Coil's built-in EngineInterceptor.
        Parameters:
        interceptors - Coil Interceptors to register ahead of all other components.
        builder - Optional lambda to further customize the ImageLoader configuration.
      • StreamImageLoaderFactory

        StreamImageLoaderFactory(Function1<ImageLoader.Builder, Unit> builder)
        Parameters:
        builder - Optional lambda to customize the ImageLoader configuration