All Versions
45
Latest Version
Avg Release Cycle
23 days
Latest Release
572 days ago
Changelog History
Page 4
Changelog History
Page 4
-
v0.13.0 Changes
September 03, 2020- Important: Launch the Interceptor chain on the main thread by default. (#513)
- This largely restores the behaviour from
0.11.0
and below where the memory cache would be checked synchronously on the main thread. - To revert to using the same behaviour as
0.12.0
where the memory cache is checked onImageRequest.dispatcher
, setImageLoader.Builder.launchInterceptorChainOnMainThread(false)
. - See
launchInterceptorChainOnMainThread
for more information.
- This largely restores the behaviour from
- ๐ Fix: Fix potential memory leak if request is started on a
ViewTarget
in a detached fragment. (#518) - ๐ Fix: Use
ImageRequest.context
to load resource URIs. (#517) - ๐ Fix: Fix race condition that could cause subsequent requests to not be saved to the disk cache. (#510)
- ๐ Fix: Use
blockCountLong
andblockSizeLong
on API 18.
- ๐ Make
ImageLoaderFactory
a fun interface. - โ Add
ImageLoader.Builder.addLastModifiedToFileCacheKey
which allows you to enable/disable adding the last modified timestamp to the memory cache key for an image loaded from aFile
.
- โก๏ธ Update Kotlin to 1.4.0.
- โก๏ธ Update Coroutines to 1.3.9.
- โก๏ธ Update Okio to 2.8.0.
- Important: Launch the Interceptor chain on the main thread by default. (#513)
-
v0.12.0 Changes
August 18, 2020- ๐ฅ Breaking:
LoadRequest
andGetRequest
have been replaced withImageRequest
:ImageLoader.execute(LoadRequest)
->ImageLoader.enqueue(ImageRequest)
ImageLoader.execute(GetRequest)
->ImageLoader.execute(ImageRequest)
ImageRequest
implementsequals
/hashCode
.
- ๐ฅ Breaking: A number of classes were renamed and/or changed package:
coil.request.RequestResult
->coil.request.ImageResult
coil.request.RequestDisposable
->coil.request.Disposable
coil.bitmappool.BitmapPool
->coil.bitmap.BitmapPool
coil.DefaultRequestOptions
->coil.request.DefaultRequestOptions
- ๐ฅ Breaking:
SparseIntArraySet
has been removed from the public API. - ๐ฅ Breaking:
TransitionTarget
no longer implementsViewTarget
. - ๐ฅ Breaking:
ImageRequest.Listener.onSuccess
's signature has changed to return anImageResult.Metadata
instead of just aDataSource
. - ๐ฅ Breaking: Remove support for
LoadRequest.aliasKeys
. This API is better handled with direct read/write access to the memory cache.
- Important: Values in the memory cache are no longer resolved synchronously (if called from the main thread).
- This change was also necessary to support executing
Interceptor
s on a background dispatcher. - This change also moves more work off the main thread, improving performance.
- This change was also necessary to support executing
- Important:
Mappers
are now executed on a background dispatcher. As a side effect, automatic bitmap sampling is no longer automatically supported. To achieve the same effect, use theMemoryCache.Key
of a previous request as theplaceholderMemoryCacheKey
of the subsequent request. See here for an example.- The
placeholderMemoryCacheKey
API offers more freedom as you can "link" two image requests with different data (e.g. different URLs for small/large images).
- The
- Important: Coil's
ImageView
extension functions have been moved from thecoil.api
package to thecoil
package.- Use find + replace to refactor
import coil.api.load
->import coil.load
. Unfortunately, it's not possible to use Kotlin'sReplaceWith
functionality to replace imports.
- Use find + replace to refactor
- Important: Use standard crossfade if drawables are not the same image.
- Important: Prefer immutable bitmaps on API 24+.
- Important:
MeasuredMapper
has been deprecated in favour of the newInterceptor
interface. See here for an example of how to convert aMeasuredMapper
into anInterceptor
.Interceptor
is a much less restrictive API that allows for a wider range of custom logic.
- Important:
ImageRequest.data
is now not null. If you create anImageRequest
without setting its data it will returnNullRequestData
as its data.
- ๐ New: Add support for direct read/write access to an
ImageLoader
'sMemoryCache
. See the docs for more information. - ๐ New: Add support for
Interceptor
s. See the docs for more information. Coil'sInterceptor
design is heavily inspired by OkHttp's! - ๐ New: Add the ability to enable/disable bitmap pooling using
ImageLoader.Builder.bitmapPoolingEnabled
.- Bitmap pooling is most effective on API 23 and below, but may still be benificial on API 24 and up (by eagerly calling
Bitmap.recycle
).
- Bitmap pooling is most effective on API 23 and below, but may still be benificial on API 24 and up (by eagerly calling
- ๐ New: Support thread interruption while decoding.
- ๐ Fix parsing multiple segments in content-type header.
- Rework bitmap reference counting to be more robust.
- ๐ Fix WebP decoding on API < 19 devices.
- ๐ฆ Expose FetchResult and DecodeResult in the EventListener API.
- Compile with SDK 30.
- โก๏ธ Update Coroutines to 1.3.8.
- โก๏ธ Update OkHttp to 3.12.12.
- โก๏ธ Update Okio to 2.7.0.
- โก๏ธ Update AndroidX dependencies:
androidx.appcompat:appcompat-resources
-> 1.2.0androidx.core:core-ktx
-> 1.3.1
- ๐ฅ Breaking:
-
v0.11.0 Changes
May 14, 2020- ๐ฅ Breaking: This version removes all existing deprecated functions.
- This enables removing Coil's
ContentProvider
so it doesn't run any code at app startup.
- This enables removing Coil's
- ๐ฅ Breaking: Convert
SparseIntArraySet.size
to a val. (#380) - ๐ฅ Breaking: Move
Parameters.count()
to an extension function. (#403) - ๐ฅ Breaking: Make
BitmapPool.maxSize
an Int. (#404)
- Important: Make
ImageLoader.shutdown()
optional (similar toOkHttpClient
). (#385)
- โฌ๏ธ Reduce the default memory cache size to 20%. (#390)
- To restore the existing behaviour set
ImageLoaderBuilder.availableMemoryPercentage(0.25)
when creating yourImageLoader
.
- To restore the existing behaviour set
- โก๏ธ Update Coroutines to 1.3.6.
- โก๏ธ Update OkHttp to 3.12.11.
- ๐ฅ Breaking: This version removes all existing deprecated functions.
-
v0.10.1 Changes
April 26, 2020- ๐ Fix OOM when decoding large PNGs on API 23 and below. (#372).
- This disables decoding EXIF orientation for PNG files. PNG EXIF orientation is very rarely used and reading PNG EXIF data (even if it's empty) requires buffering the entire file into memory, which is bad for performance.
- ๐ Minor Java compatibility improvements to
SparseIntArraySet
.
- โก๏ธ Update Okio to 2.6.0.
- ๐ Fix OOM when decoding large PNGs on API 23 and below. (#372).
-
v0.10.0 Changes
April 20, 2020Highlights
๐ This version deprecates most of the DSL API in favour of using the builders directly. Here's what the change looks like:
// 0.9.5 (old) val imageLoader = ImageLoader(context) { bitmapPoolPercentage(0.5) crossfade(true) } val disposable = imageLoader.load(context, "https://www.example.com/image.jpg") { target(imageView) } val drawable = imageLoader.get("https://www.example.com/image.jpg") { size(512, 512) } // 0.10.0 (new) val imageLoader = ImageLoader.Builder(context) .bitmapPoolPercentage(0.5) .crossfade(true) .build() val request = LoadRequest.Builder(context) .data("https://www.example.com/image.jpg") .target(imageView) .build() val disposable = imageLoader.execute(request) val request = GetRequest.Builder(context) .data("https://www.example.com/image.jpg") .size(512, 512) .build() val drawable = imageLoader.execute(request).drawable
- If you're using the
io.coil-kt:coil
artifact, you can callCoil.execute(request)
to execute the request with the singletonImageLoader
.
- If you're using the
ImageLoader
s now have a weak reference memory cache that tracks weak references to images once they're evicted from the strong reference memory cache.- This means an image will always be returned from an
ImageLoader
's memory cache if there's still a strong reference to it. - Generally, this should make the memory cache much more predictable and increase its hit rate.
- This behaviour can be enabled/disabled with
ImageLoaderBuilder.trackWeakReferences
.
- This means an image will always be returned from an
Add a new artifact,
io.coil-kt:coil-video
, to decode specific frames from a video file. Read more here.โ Add a new EventListener API for tracking metrics.
โ Add ImageLoaderFactory which can be implemented by your
Application
to simplify singleton initialization.
๐ Full Release Notes
- Important: Deprecate DSL syntax in favour of builder syntax. (#267)
- Important: Deprecate
Coil
andImageLoader
extension functions. (#322) - ๐ฅ Breaking: Return sealed
RequestResult
type fromImageLoader.execute(GetRequest)
. (#349) - ๐ฅ Breaking: Rename
ExperimentalCoil
toExperimentalCoilApi
. Migrate from@Experimental
to@RequiresOptIn
. (#306) - ๐ฅ Breaking: Replace
CoilLogger
withLogger
interface. (#316) - ๐ฅ Breaking: Rename destWidth/destHeight to dstWidth/dstHeight. (#275)
- ๐ฅ Breaking: Re-arrange
MovieDrawable
's constructor params. (#272) - ๐ฅ Breaking:
Request.Listener
's methods now receive the fullRequest
object instead of just its data. - ๐ฅ Breaking:
GetRequestBuilder
now requires aContext
in its constructor. - ๐ฅ Breaking: Several properties on
Request
are now nullable. - Behaviour change: Include parameter values in the cache key by default. (#319)
- Behaviour change: Slightly adjust
Request.Listener.onStart()
timing to be called immediately afterTarget.onStart()
. (#348)
- ๐ New: Add
WeakMemoryCache
implementation. (#295) - ๐ New: Add
coil-video
to support decoding video frames. (#122) - ๐ New: Introduce
EventListener
. (#314) - ๐ New: Introduce
ImageLoaderFactory
. (#311) - ๐ New: Support animated HEIF image sequences on Android 11. (#297)
- ๐ New: Improve Java compatibility. (#262)
- ๐ New: Support setting a default
CachePolicy
. (#307) - ๐ New: Support setting a default
Bitmap.Config
. (#342) - ๐ New: Add
ImageLoader.invalidate(key)
to clear a single memory cache item (#55) - ๐ New: Add debug logs to explain why a cached image is not reused. (#346)
- ๐ New: Support
error
andfallback
drawables for get requests.
- ๐ Fix: Fix memory cache miss when Transformation reduces input bitmap's size. (#357)
- ๐ Fix: Ensure radius is below RenderScript max in BlurTransformation. (#291)
- ๐ Fix: Fix decoding high colour depth images. (#358)
- ๐ Fix: Disable
ImageDecoderDecoder
crash work-around on Android 11 and above. (#298) - ๐ Fix: Fix failing to read EXIF data on pre-API 23. (#331)
- ๐ Fix: Fix incompatibility with Android R SDK. (#337)
- ๐ Fix: Only enable inexact size if
ImageView
has a matchingSizeResolver
. (#344) - ๐ Fix: Allow cached images to be at most one pixel off requested size. (#360)
- ๐ Fix: Skip crossfade transition if view is not visible. (#361)
- ๐ Deprecate
CoilContentProvider
. (#293) - Annotate several
ImageLoader
methods with@MainThread
. - Avoid creating a
LifecycleCoroutineDispatcher
if the lifecycle is currently started. (#356) - ๐ฆ Use full package name for
OriginalSize.toString()
. - Preallocate when decoding software bitmap. (#354)
- โก๏ธ Update Kotlin to 1.3.72.
- โก๏ธ Update Coroutines to 1.3.5.
- โก๏ธ Update OkHttp to 3.12.10.
- โก๏ธ Update Okio to 2.5.0.
- โก๏ธ Update AndroidX dependencies:
androidx.exifinterface:exifinterface
-> 1.2.0
-
v0.9.5 Changes
February 06, 2020- ๐ Fix: Ensure a view is attached before checking if it is hardware accelerated. This fixes a case where requesting a hardware bitmap could miss the memory cache.
- โก๏ธ Update AndroidX dependencies:
androidx.core:core-ktx
-> 1.2.0
-
v0.9.4 Changes
February 03, 2020- ๐ Fix: Respect aspect ratio when downsampling in ImageDecoderDecoder. Thanks @zhanghai.
- Previously bitmaps would be returned from the memory cache as long as their config was greater than or equal to the config specified in the request. For example, if you requested an
ARGB_8888
bitmap, it would be possible to have aRGBA_F16
bitmap returned to you from the memory cache. Now, the cached config and the requested config must be equal. - ๐ Make
scale
anddurationMillis
public inCrossfadeDrawable
andCrossfadeTransition
.
-
v0.9.3 Changes
February 01, 2020- ๐ Fix: Translate child drawable inside
ScaleDrawable
to ensure it is centered. - ๐ Fix: Fix case where GIFs and SVGs would not fill bounds completely.
- Defer calling
HttpUrl.get()
to background thread. - ๐ Improve BitmapFactory null bitmap error message.
- โ Add 3 devices to hardware bitmap blacklist. (#264)
- โก๏ธ Update AndroidX dependencies:
androidx.lifecycle:lifecycle-common-java8
-> 2.2.0
- ๐ Fix: Translate child drawable inside
-
v0.9.2 Changes
January 19, 2020- ๐ Fix: Fix decoding GIFs on pre-API 19. Thanks @mario.
- ๐ Fix: Fix rasterized vector drawables not being marked as sampled.
- ๐ Fix: Throw exception if Movie dimensions are <= 0.
- ๐ Fix: Fix CrossfadeTransition not being resumed for a memory cache event.
- ๐ Fix: Prevent returning hardware bitmaps to all target methods if disallowed.
- ๐ Fix: Fix MovieDrawable not positioning itself in the center of its bounds.
- โ Remove automatic scaling from CrossfadeDrawable.
- ๐ Make
BitmapPool.trimMemory
public. - Wrap AnimatedImageDrawable in a ScaleDrawable to ensure it fills its bounds.
- โ Add @JvmOverloads to RequestBuilder.setParameter.
- Set an SVG's view box to its size if the view box is not set.
- Pass state and level changes to CrossfadeDrawable children.
- โก๏ธ Update OkHttp to 3.12.8.
-
v0.9.1 Changes
December 30, 2019๐ See CHANGELOG.md.