All Versions
45
Latest Version
Avg Release Cycle
23 days
Latest Release
544 days ago
Changelog History
Page 2
Changelog History
Page 2
-
v2.0.0-alpha07 Changes
January 30, 2022- ๐ Significantly improve
AsyncImage
performance and splitAsyncImage
intoAsyncImage
andSubcomposeAsyncImage
. (#1048)SubcomposeAsyncImage
providesloading
/success
/error
/content
slot APIs and uses subcomposition which has worse performance.-
AsyncImage
providesplaceholder
/error
/fallback
arguments to overwrite thePainter
that's drawn when loading or if the request is unsuccessful.AsyncImage
does not use subcomposition and has much better performance thanSubcomposeAsyncImage
. - Remove
AsyncImagePainter.State
argument fromSubcomposeAsyncImage.content
. Usepainter.state
if needed. - Add
onLoading
/onSuccess
/onError
callbacks to bothAsyncImage
andSubcomposeAsyncImage
.
- ๐ Deprecate
LocalImageLoader
. (#1101) - โ Add support for
ImageRequest.tags
. (#1066) - ๐ Move
isGif
,isWebP
,isAnimatedWebP
,isHeif
, andisAnimatedHeif
inDecodeUtils
into coil-gif. AddisSvg
to coil-svg. (#1117) - Convert
FetchResult
andDecodeResult
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
inImageDecoderDecoder
. (#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.
- ๐ Significantly improve
-
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
forAsyncImage
ifloading
,success
, anderror
are all set. (#1026) - ๐ Use androidx
LruCache
instead of the platformLruCache
. (#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.
- โ Add
-
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 twoDimension
values for its width and height.Dimension
can either be a positive pixel value orDimension.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 benull
ifimageLoader.memoryCache
is null. - Convert
ImageLoader
,SizeResolver
, andViewSizeResolver
constructor-likeinvoke
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 ofandroidx.collection-ktx
. - โก๏ธ Update Okhttp to 4.9.3.
- Important: Refactor
-
v2.0.0-alpha04 Changes
November 22, 2021- ๐ New: Add
AsyncImage
tocoil-compose
.AsyncImage
is a composable that executes anImageRequest
asynchronously and renders the result.AsyncImage
is intended to replacerememberImagePainter
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
, andFilterQuality
. - It supports overwriting what's drawn for each
AsyncImagePainter
state using thecontent
,loading
,success
, anderror
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
toAsyncImagePainter
andrememberImagePainter
torememberAsyncImagePainter
.ExecuteCallback
is no longer supported. To have theAsyncImagePainter
skip waiting foronDraw
to be called, setImageRequest.size(OriginalSize)
(or any size) instead.- Add an optional
FilterQuality
argument torememberAsyncImagePainter
.
- ๐ Use coroutines for cleanup operations in
DiskCache
and addDiskCache.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 ofcompose.ui
. - โก๏ธ Update
androidx.appcompat-resources
to 1.4.0.
- ๐ New: Add
-
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 intolifecycle-common
.
- Remove dependency on
-
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.
- Importing
- ๐ 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.
- โ Add a new
-
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
ImageSource
s backed byFile
s. This avoids unnecessary copying when an Android API requires aFile
to decode (e.g.MediaMetadataRetriever
). - Support reading from/writing to the disk cache files directly.
- Use
ImageLoader.Builder.diskCache
andDiskCache.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 - exceptVary
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.
- This change was made to:
- Important:
ImageRequest
's defaultScale
is nowScale.FIT
- This was changed to make
ImageRequest.scale
consistent with other classes that have a defaultScale
. - Requests with an
ImageViewTarget
still have their scale autodetected.
- This was changed to make
- Significant changes to the image pipeline classes:
Mapper
,Fetcher
, andDecoder
have been refactored to be more flexible.Fetcher.key
has been replaced with a newKeyer
interface.Keyer
creates the cache key from the input data.- Adds
ImageSource
, which allowsDecoder
s to decodeFile
s directly.
- ๐
BitmapPool
andPoolableViewTarget
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 clearImageView
s, 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.
- If you use Java, passing null as a not-null annotated parameter to a function will no longer throw a
- ๐
VideoFrameFileFetcher
andVideoFrameUriFetcher
are removed from the library. UseVideoFrameDecoder
instead, which supports all data sources. - โ Adds support for
bitmapFactoryMaxParallelism
, which restricts the maximum number of in-progressBitmapFactory
operations. This value is 4 by default, which improves UI performance. - โ Adds support for
interceptorDispatcher
,fetcherDispatcher
,decoderDispatcher
, andtransformationDispatcher
. - ๐จ
Disposable
has been refactored and exposes the underlyingImageRequest
'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 commonViewTarget
logic. - ๐
BlurTransformation
andGrayscaleTransformation
are removed from the library.- If you use them, you can copy their code into your project.
ImageRequest.error
is now set on theTarget
ifImageRequest.fallback
is null.Transformation.key
is replaced withTransformation.cacheKey
.ImageRequest.Listener
returnsSuccessResult
/ErrorResult
inonSuccess
andonError
respectively.- โ Add
ByteBuffer
s 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
toImagePainter.State.Success
andImagePainter.State.Error
. (#887)- This is a binary incompatible change to the signatures of
ImagePainter.State.Success
andImagePainter.State.Error
, however these APIs are marked as experimental.
- This is a binary incompatible change to the signatures of
- Only execute
CrossfadeTransition
ifView.isShown
istrue
. Previously it would only checkView.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 customDrawablePainter
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.
- ๐ New: Add
-
v1.3.2 Changes
August 04, 2021- ๐ป
coil-compose
now depends oncompose.ui
instead ofcompose.foundation
.compose.ui
is a smaller dependency as it's a subset ofcompose.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
to1.3.1
.
- ๐ Update Jetpack Compose to