All Versions
45
Latest Version
Avg Release Cycle
23 days
Latest Release
544 days ago

Changelog History
Page 2

  • v2.0.0-alpha07 Changes

    January 30, 2022
    • ๐ŸŽ Significantly improve AsyncImage performance and split AsyncImage into AsyncImage and SubcomposeAsyncImage. (#1048)
      • SubcomposeAsyncImage provides loading/success/error/content slot APIs and uses subcomposition which has worse performance.
      • AsyncImage provides placeholder/error/fallback arguments to overwrite the Painter that's drawn when loading or if the request is unsuccessful. AsyncImage does not use subcomposition and has much better performance than SubcomposeAsyncImage.
      • Remove AsyncImagePainter.State argument from SubcomposeAsyncImage.content. Use painter.state if needed.
      • Add onLoading/onSuccess/onError callbacks to both AsyncImage and SubcomposeAsyncImage.
    • ๐Ÿ—„ Deprecate LocalImageLoader. (#1101)
    • โž• Add support for ImageRequest.tags. (#1066)
    • ๐Ÿšš Move isGif, isWebP, isAnimatedWebP, isHeif, and isAnimatedHeif in DecodeUtils into coil-gif. Add isSvg to coil-svg. (#1117)
    • Convert FetchResult and DecodeResult to be non-data classes. (#1114)
    • โœ‚ Remove unused DiskCache.Builder context argument. (#1099)
    • ๐Ÿ›  Fix scaling for bitmap resources with original size. (#1072)
    • ๐Ÿ›  Fix failing to close ImageDecoder in ImageDecoderDecoder. (#1109)
    • ๐Ÿ›  Fix incorrect scaling when converting a drawable to a bitmap. (#1084)
    • โšก๏ธ Update Compose to 1.1.0-rc03.
    • โšก๏ธ Update accompanist-drawablepainter to 0.22.1-rc.
    • โšก๏ธ Update androidx.appcompat:appcompat-resources to 1.4.1.
  • v2.0.0-alpha06 Changes

    December 24, 2021
    • โž• Add ImageSource.Metadata to support decoding from assets, resources, and content URIs without buffering or temporary files. (#1060)
    • Delay executing the image request until AsyncImage has positive constraints. (#1028)
    • ๐Ÿ›  Fix using DefaultContent for AsyncImage if loading, success, and error are all set. (#1026)
    • ๐Ÿ‘‰ Use androidx LruCache instead of the platform LruCache. (#1047)
    • โšก๏ธ Update Kotlin to 1.6.10.
    • โšก๏ธ Update Coroutines to 1.6.0.
    • โšก๏ธ Update Compose to 1.1.0-rc01.
    • โšก๏ธ Update accompanist-drawablepainter to 0.22.0-rc.
    • โšก๏ธ Update androidx.collection to 1.2.0.
  • v2.0.0-alpha05 Changes

    November 28, 2021
    • Important: Refactor Size to support using the image's original size for either dimension.
      • Size is now composed of two Dimension values for its width and height. Dimension can either be a positive pixel value or Dimension.Original.
      • This change was made to better support unbounded width/height values (e.g. wrap_content, Constraints.Infinity) when one dimension is a fixed pixel value.
    • ๐Ÿ›  Fix: Support inspection mode (preview) for AsyncImage.
    • ๐Ÿ›  Fix: SuccessResult.memoryCacheKey should always be null if imageLoader.memoryCache is null.
    • Convert ImageLoader, SizeResolver, and ViewSizeResolver constructor-like invoke functions to top level functions.
    • ๐Ÿ‘‰ Make CrossfadeDrawable start and end drawables public API.
    • Mutate ImageLoader placeholder/error/fallback drawables.
    • โž• Add default arguments to SuccessResult's constructor.
    • Depend on androidx.collection instead of androidx.collection-ktx.
    • โšก๏ธ Update Okhttp to 4.9.3.
  • v2.0.0-alpha04 Changes

    November 22, 2021
    • ๐Ÿ†• New: Add AsyncImage to coil-compose.
      • AsyncImage is a composable that executes an ImageRequest asynchronously and renders the result.
      • AsyncImage is intended to replace rememberImagePainter for most use cases.
      • Its API is not final and may change before the final 2.0 release.
      • It has a similar API to Image and supports the same arguments: Alignment, ContentScale, alpha, ColorFilter, and FilterQuality.
      • It supports overwriting what's drawn for each AsyncImagePainter state using the content, loading, success, and error arguments.
      • It fixes a number of design issues that rememberImagePainter has with resolving image size and scale.
      • Example usages:
    // Only draw the image.
    AsyncImage(
        model = "https://example.com/image.jpg",
        contentDescription = null // Avoid `null` and set this to a localized string if possible.
    )
    
    // Draw the image with a circle crop, crossfade, and overwrite the `loading` state.
    AsyncImage(
        model = ImageRequest.Builder(LocalContext.current)
            .data("https://example.com/image.jpg")
            .crossfade(true)
            .build(),
        contentDescription = null,
        modifier = Modifier
            .clip(CircleShape),
        loading = {
            CircularProgressIndicator()
        },
        contentScale = ContentScale.Crop
    )
    
    // Draw the image with a circle crop, crossfade, and overwrite all states.
    AsyncImage(
        model = ImageRequest.Builder(LocalContext.current)
            .data("https://example.com/image.jpg")
            .crossfade(true)
            .build(),
        contentDescription = null,
        modifier = Modifier
            .clip(CircleShape),
        contentScale = ContentScale.Crop
    ) { state ->
        if (state is AsyncImagePainter.State.Loading) {
            CircularProgressIndicator()
        } else {
            AsyncImageContent() // Draws the image.
        }
    }
    
    • Important: Rename ImagePainter to AsyncImagePainter and rememberImagePainter to rememberAsyncImagePainter.
      • ExecuteCallback is no longer supported. To have the AsyncImagePainter skip waiting for onDraw to be called, set ImageRequest.size(OriginalSize) (or any size) instead.
      • Add an optional FilterQuality argument to rememberAsyncImagePainter.
    • ๐Ÿ— Use coroutines for cleanup operations in DiskCache and add DiskCache.Builder.cleanupDispatcher.
    • ๐Ÿ›  Fix Compose preview for placeholder set using ImageLoader.Builder.placeholder.
    • Mark LocalImageLoader.current with @ReadOnlyComposable to generate more efficient code.
    • โšก๏ธ Update Compose to 1.1.0-beta03 and depend on compose.foundation instead of compose.ui.
    • โšก๏ธ Update androidx.appcompat-resources to 1.4.0.
  • v2.0.0-alpha03 Changes

    November 12, 2021
    • โž• Add ability to load music thumbnails on Android 29+. (#967)
    • ๐Ÿ›  Fix: Use context.resources to load resources for current package. (#968)
    • ๐Ÿ›  Fix: clear -> dispose replacement expression. (#970)
    • โšก๏ธ Update Compose to 1.0.5.
    • โšก๏ธ Update accompanist-drawablepainter to 0.20.2.
    • โšก๏ธ Update Okio to 3.0.0.
    • โšก๏ธ Update androidx.annotation to 1.3.0.
    • โšก๏ธ Update androidx.core to 1.7.0.
    • โšก๏ธ Update androidx.lifecycle to 2.4.0.
      • Remove dependency on lifecycle-common-java8 as it's been merged into lifecycle-common.
  • v2.0.0-alpha02 Changes

    October 24, 2021
    • โž• Add a new coil-bom artifact which includes a bill of materials.
      • Importing coil-bom allows you to depend on other Coil artifacts without specifying a version.
    • ๐Ÿ›  Fix failing to load an image when using ExecuteCallback.Immediate.
    • โšก๏ธ Update Okio to 3.0.0-alpha.11.
      • This also resolves a compatibility issue with Okio 3.0.0-alpha.11.
    • โšก๏ธ Update Kotlin to 1.5.31.
    • โšก๏ธ Update Compose to 1.0.4.
  • v2.0.0-alpha01 Changes

    October 11, 2021

    ๐Ÿš€ Coil 2.0.0 is the next major iteration of the library and has new features, performance improvements, API improvements, and various bug fixes. This release may be binary/source incompatible with future alpha releases until the stable release of 2.0.0.

    • Important: The minimum supported API is now 21.
    • Important: Enable -Xjvm-default=all.
      • This generates Java 8 default methods instead of using Kotlin's default interface method support. Check out this blog post for more information.
      • You'll need to add -Xjvm-default=all or -Xjvm-default=all-compatibility to your build file as well. See here for how to do this.
    • Important: Coil now has its own disk cache implementation and no longer relies on OkHttp for disk caching.
      • This change was made to:
        • Better support thread interruption while decoding images. This improves performance when image requests are started and stopped in quick succession.
        • Support exposing ImageSources backed by Files. This avoids unnecessary copying when an Android API requires a File to decode (e.g. MediaMetadataRetriever).
        • Support reading from/writing to the disk cache files directly.
      • Use ImageLoader.Builder.diskCache and DiskCache.Builder to configure the disk cache.
      • You should not use OkHttp's Cache with Coil 2.0 as it can be corrupted if it's interrupted while writing to it.
      • Cache-Control and other cache headers are still supported - except Vary headers, as the cache only checks that the URLs match. Additionally, only responses with a response code in the range [200..300) are cached.
      • Support for cache headers can be enabled or disabled using ImageLoader.Builder.respectCacheHeaders.
      • Your existing disk cache will be cleared and rebuilt when upgrading to 2.0.
    • Important: ImageRequest's default Scale is now Scale.FIT
      • This was changed to make ImageRequest.scale consistent with other classes that have a default Scale.
      • Requests with an ImageViewTarget still have their scale autodetected.
    • Significant changes to the image pipeline classes:
      • Mapper, Fetcher, and Decoder have been refactored to be more flexible.
      • Fetcher.key has been replaced with a new Keyer interface. Keyer creates the cache key from the input data.
      • Adds ImageSource, which allows Decoders to decode Files directly.
    • ๐Ÿšš BitmapPool and PoolableViewTarget have been removed from the library. Bitmap pooling was removed because:
      • It's most effective on <= API 23 and has become less effective with newer Android releases.
      • Removing bitmap pooling allows Coil to use immutable bitmaps, which have performance benefits.
      • There's runtime overhead to manage the bitmap pool.
      • Bitmap pooling creates design restrictions on Coil's API as it requires tracking if a bitmap is eligible for pooling. Removing bitmap pooling allows Coil to expose the result Drawable in more places (e.g. Listener, Disposable). Additionally, this means Coil doesn't have to clear ImageViews, which has can cause issues.
      • Bitmap pooling is error-prone. Allocating a new bitmap is much safer than attempting to re-use a bitmap that could still be in use.
    • ๐Ÿ”จ MemoryCache has been refactored to be more flexible.
    • Disable generating runtime not-null assertions.
      • If you use Java, passing null as a not-null annotated parameter to a function will no longer throw a NullPointerException immediately. If you use Kotlin, there is essentially no change.
      • This change allows the library's size to be smaller.
    • ๐Ÿšš VideoFrameFileFetcher and VideoFrameUriFetcher are removed from the library. Use VideoFrameDecoder instead, which supports all data sources.
    • โž• Adds support for bitmapFactoryMaxParallelism, which restricts the maximum number of in-progress BitmapFactory operations. This value is 4 by default, which improves UI performance.
    • โž• Adds support for interceptorDispatcher, fetcherDispatcher, decoderDispatcher, and transformationDispatcher.
    • ๐Ÿ”จ Disposable has been refactored and exposes the underlying ImageRequest's job.
    • ๐Ÿ”„ Change Transition.transition to be a non-suspending function as it's no longer needed to suspend the transition until it completes.
    • โž• Add GenericViewTarget, which handles common ViewTarget logic.
    • ๐Ÿšš BlurTransformation and GrayscaleTransformation are removed from the library.
      • If you use them, you can copy their code into your project.
    • ImageRequest.error is now set on the Target if ImageRequest.fallback is null.
    • Transformation.key is replaced with Transformation.cacheKey.
    • ImageRequest.Listener returns SuccessResult/ErrorResult in onSuccess and onError respectively.
    • โž• Add ByteBuffers to the default supported data types.
    • โœ‚ Remove toString implementations from several classes.
    • โšก๏ธ Update OkHttp to 4.9.2.
    • โšก๏ธ Update Okio to 3.0.0-alpha.10.
  • v1.4.0 Changes

    October 06, 2021
    • ๐Ÿ†• New: Add ImageResult to ImagePainter.State.Success and ImagePainter.State.Error. (#887)
      • This is a binary incompatible change to the signatures of ImagePainter.State.Success and ImagePainter.State.Error, however these APIs are marked as experimental.
    • Only execute CrossfadeTransition if View.isShown is true. Previously it would only check View.isVisible. (#898)
    • ๐Ÿ›  Fix potential memory cache miss if scaling multiplier is slightly less than 1 due to a rounding issue. (#899)
    • ๐Ÿ‘‰ Make non-inlined ComponentRegistry methods public. (#925)
    • ๐Ÿšš Depend on accompanist-drawablepainter and remove Coil's custom DrawablePainter implementation. (#845)
    • โœ‚ Remove use of a Java 8 method to guard against desugaring issue. (#924)
    • Promote ImagePainter.ExecuteCallback to stable API. (#927)
    • โšก๏ธ Update compileSdk to 31.
    • โšก๏ธ Update Kotlin to 1.5.30.
    • โšก๏ธ Update Coroutines to 1.5.2.
    • โšก๏ธ Update Compose to 1.0.3.
  • v1.3.2 Changes

    August 04, 2021
    • ๐Ÿ’ป coil-compose now depends on compose.ui instead of compose.foundation.
      • compose.ui is a smaller dependency as it's a subset of compose.foundation.
    • โšก๏ธ Update Jetpack Compose to 1.0.1.
    • โšก๏ธ Update Kotlin to 1.5.21.
    • โšก๏ธ Update Coroutines to 1.5.1.
    • โšก๏ธ Update androidx.exifinterface:exifinterface to 1.3.3.
  • v1.3.1 Changes

    July 28, 2021
    • ๐Ÿš€ Update Jetpack Compose to 1.0.0. Huge congrats to the Compose team on the stable release!
    • โšก๏ธ Update androidx.appcompat:appcompat-resources to 1.3.1.