kf extension on PHLivePhotoView to load a live photo from network. Check its documentation for more information. #2302 @onevcatKFAnimatedImage does not receive user interaction. #2295 @onevcat @danieldaquinoasync compatible. Kingfisher is also now built under strict concurrency mode. #2239 @onevcatUIGraphicsBeginImageContextWithOptions. #2274 @onevcatremoveSizeExceededValues method in DiskStorage as public. Now it is possible to call this method to trigger a cleanup of the disk cache manually. #2214 @nickruddeniPHPickerResultImageDataProvider for loading and caching images from PHPickerResult. #2233 @nuomi1reducePriorityOnDisappear for SwiftUI. It sets a lower priority for the image download task when the view disappears, and restore it when re-appears. #2211 @Aelx-Vaiman.process for the PrivacyInfo.xcprivacy in SPM to follow the practice suggested by Apple. #2243 @BorysKhl @onevcatautoExtAfterHashedFileName is set to true. #2250 @freezy7Any? to a protocol value. #2182CPListItem) compiles again for iOS SDK 14.0 to 14.4. It was because an undocumented API change in the CPListItem property. #2172 @brendonjkdingView refreshing loop when KFImage is set with startLoadingBeforeViewAppear to true and the loading keeping fails. #2169 @onevcat @sisoje @mirkokg-Swift.h header again for ObjC compatibility. #2138 @yev-kanivetsUIScreen API. #2157 @hyun99999PrivacyInfo.xcprivacy) to the project to meet Apple's requirement of describing data collected and use of required reason API. #2104ImageDownloadResult. This allows overriding side to construct and return a valid download result. #2107 @kmaschke85AnimatedImageView. #2094 @yeatseImageResource and rename it to KF.ImageResource. This triggers a warning when explicitly refering to ImageResource, which conflicts to the identical names from Apple's GeneratedAssetSymbols or DeveloperToolsSupport in Xcode 15. It does not fix the issue automatically, but can help to achieve a smoother transition. #2092 @JohnnyTseng @rtharstonimageDownloader(_:didReceive:completionHandler:) delegate method in ImageDownloaderDelegate to allow making ResponseDisposition decision to the download task. #2048 @onevcatSource.Identifier. #2074 @iwill-hwangnil URL to a KFImage when startLoadingBeforeViewAppear is also true. #2035 Big thanks to @BobbyRohwederCPListItem won't set the image back to blank when the loading failing. Now it keeps showing the placeholder, if set. #2031 @DevVenusKcontentConfigure modifier to KFImage and related view types under SwiftUI. This allows you returning a non-image view to finish the configuation and display it as the loading result of KFImage. #2027cachePathBlock public so you can also configure it when creating a custom DiskStorage.Config. #2025 by @zarechnyyKFImage modifier startLoadingBeforeViewAppear to allow image loading before SwiftUI view's onAppear. This is a workaround for #1988.backgroundDecode option. #2009_UIImageCGImageContent when loading GIF files on iOS 15 or later. #2004DefaultCacheSerializer.preferCacheOriginalData is set to true. #1999data property in RetrieveImageResult for reading the original data when an image loading is done. #1986data getter in ImageDataProvider. More async methods are on the way. #1989KFImage does not load images when embedded in the SwiftUI List on iOS 16. This only alleviates the problem when shallow embedded. For deeper nested, waiting for Apple's fix. #1988 FB11564208KFImage should have the same layout behavior as SwiftUI's AsyncImage while loading. if no placeholder is set, it takes all the proposed size while loading. If a placeholder is set, it propose size to the placeholder and follow placeholder's layout. #1975EmptyView as KFImage placeholder fails loading of the image. #1973 [@damian-rzeszot]ImageProgressive now contains a delegate onImageUpdated which will notify you everytime the progressive scanner can decode an intermediate image. You also have a chance to choose an image update strategy to respond the delegate. #1957 @jyounusprogressive option can work with KingfisherManager. Previously it only works when set in the view extension methods under kf. #1961 @onevcatAnimatedImageView that releasing on another thread. #1956 @ufoskyImageProgressive.onImageUpdated, the semantic of ImageProgressive.default is conflicting with the behavior. ImageProgressive.default is now marked as deprecated. To initilize a default ImageProgressive, use ImageProgressive.init() instead.AVAssetImageDataProvider support tracking transform by default. This could solve some cases that the video thumbnail were not at correct orientation. #1951 @sgarg4008requestModifier parameter with AsyncImageDownloadRequestModifier to allow async request changing. #1918 @KKirstenResource. #1914 @onevcatAnimatedImageView. #1886ImageResource's initializer. #1903diskStoreWriteOptions from KFOptionSetter. Now it supports to be set in a chainable way. #1862 @ignotusverumRadius type which prevents the framework being used in Playground. #1872KFImage does not load images correctly when a huge amount of images are being loaded due to animation setting. #1873 @tatsuz0u@Published to allow refering KFImage even under a deploy target below iOS 13. #1875KFImage loading causes a freeze on certain iOS 14 systems. #1849 Thanks reporting from @JetForMe @benjamincombes @aralatpulatAnimatedImageView now correctly replaces its layer contents. #1836 @phantomatoCPListItem. #1802 from @waynehartmanonFailureImage modifier back to KFImage, which was unexpected removed while upgrading. #1829 from @skellockbody is evaluated. This fixes an unwanted flickering. This also adds a protection for internal loading state. #1828 from @JetForMe and @IvanShahCGFloat style of a color instead of a hex value to allow extended color space when setting it to a processor. #1826 from @vonox7KFImage's internal rendered view is wrapped by a ZStack. This prevents a lazy container from recognizing different KFImages with a same URL as the same view. #1840 from @iOSappssolutions@StateObject instead of the old @ObservedObject. It provides a stable and better data model backs the image rendering in SwiftUI. For this, Kingfisher SwiftUI supports from iOS 14 now. #1707ImageCache.retrieveImageInMemoryCache(forKey:options:) as open to expose a correct override entry point to outside. #1703NSTextAttachment extension method now accepts closure instead of a evaluated view. This allows delaying the passing in view to the timing which actually it is needed. #1746KFAnimatedImage type to display a GIF image in SwiftUI. #1705progress parameter to the KFImage's placeholder closure. This allows you create a view based on the loading progress. #1707KFAnimatedImage also supports configure modifier so you can set options to the underhood AnimatedImageView. #1768AnimatedImageView fields to allow consumers to observe GIF progress. #1789 @AttilaTheFun.atomic or .completeFileProtection. #1793 @ignotusverumUIGraphicsImageRenderer on iOS and tvOS for better image drawing. #1706KF.retry(:_) method now accepts an optional value. It allows to reset the retry strategy by passing in a nil value. #1729placeholder view builder of KFImage now works when it gets changed instead of using its initial value forever. #1707LocalFileImageDataProvider now loads data in a background queue by default. This prevents loading performance issue when the loading is created on main thread. #1764 @ConfusedVorlonKFImage. #1767AuthenticationChallengeResponsable. Now use AuthenticationChallengeResponsible instead. #1780 @fakerlogicAnimatedImageView dose not change the tintColor for templated images. #1786 @leonpesdkKFImage.loadImmediately is not necessary anymore due to the model switching to @StateObject. The interface is kept for backward compatibility, but it does nothing in the new version. #1707.atomic or .completeFileProtection. #1793KFAnimatedImage also supports configure modifier so you can set options to the underhood AnimatedImageView. #1768AnimatedImageView fields to allow consumers to observe GIF progress. #1789KFImage. #1767AuthenticationChallengeResponsable. Now use AuthenticationChallengeResponsible instead. #1780AnimatedImageView dose not change the tintColor for templated images. #1786LocalFileImageDataProvider now loads data in a background queue by default. This prevents loading performance issue when the loading is created on main thread. [#1764]@StateObject instead of the old @ObservedObject. It provides a stable and better data model backs the image rendering in SwiftUI. For this, Kingfisher SwiftUI supports from iOS 14 now. #1707ImageCache.retrieveImageInMemoryCache(forKey:options:) as open to expose a correct override entry point to outside. #1703NSTextAttachment extension method now accepts closure instead of a evaluated view. This allows delaying the passing in view to the timing which actually it is needed. #1746KFAnimatedImage type to display a GIF image in SwiftUI. #1705progress parameter to the KFImage's placeholder closure. This allows you create a view based on the loading progress. #1707UIGraphicsImageRenderer on iOS and tvOS for better image drawing. #1706KF.retry(:_) method now accepts an optional value. It allows to reset the retry strategy by passing in a nil value. #1729placeholder view builder of KFImage now works when it gets changed instead of using its initial value forever. #1707KFImage.loadImmediately is not necessary anymore due to the model switching to @StateObject. The interface is kept for backward compatibility, but it does nothing in the new version. #1707SessionDelegate as public to allow a subclass to take over the delegate methods from session tasks. #1658imageDownloader(_:didDownload:with:) in ImageDownloaderDelegate to pass not only Data but also the whole URLResponse to delegate method. Now you can determine how to handle these data based on the received response. #1676autoExtAfterHashedFileName in DiskStorage.Config to allow appending the file extension extracted from the cache key. #1671AnimatedImageView. Thanks for contribution from @wow-such-amazing #1686DiskStorage and MemoryStorage, are now marked as public. So you can use them standalone in your project. #1649imageFrameCount property in image view extensions. It holds the frame count of an animated image if available. #1647extraSessionDelegateHandler in ImageDownloader. Now you can receive the related session task delegate method by registering an external delegate object. #1620loadImmediately for KFImage to start the load manually. It is useful if you want to load the image before onAppear is called.@State for keeping image across View update for KFImage. This should fix some SwiftUI internal crash when setting the image in KFImage. #1642ImageBinder now is marked with weak. This helps release memory quicker in some cases. #1640KF builder methods also accept optional URL or Source. It aligns the syntax with the normal view extension methods. #1617ImageBinder. It might cause view state lost for a KFImage. #1624ImageCache will disable the disk storage when there is no free space on disk when creating the cache folder, instead of just crashing it. #1628@State lost when using a view inside another container in a Lazy stack or grid. #1631KFImage. #1629KFImage. Now the image reloading works in a more stable way without task dispatching. #1604fade and forceTransition modifier to KFImage to support built-in fade in effect when loading image in SwiftUI. #1604ImageModifier is applied, the modified image is not cached to memory cache anymore. The ImageModifier is intended to be used just before setting the image to a view and now it works as expected. #1612SwiftUI and Combine are declared as weak link in podspec. This is a workaround for some rare case build issue. It does not affect supported deploy version of Kingfisher. #1607KFImage initialized, to keep the same behavior as previous versions. #1594A KF shorthand to create image setting tasks and config them. It provides a cleaner and modern way to use Kingfisher. Now, instead of using imageView.kf.setImage(with:options:), you can perform chain-able invocation with KF helpers. For example, the code below is identical. #1546
// Old way
imageView.kf.setImage(
with: url,
placeholder: localImage,
options: [.transition(.fade(1)), .loadDiskFileSynchronously],
progressBlock: { receivedSize, totalSize in
print("progressBlock")
},
completionHandler: { result in
print(result)
}
)
// New way
KF.url(url)
.placeholder(localImage)
.fade(duration: 1)
.loadDiskFileSynchronously()
.onProgress { _ in print("progressBlock") }
.onSuccess { result in print(result) }
.onFailure { err in print("Error: \(err)") }
.set(to: imageView)
Similar to KF, The KFImage for SwiftUI is now having the similar chain-able syntax to setup an image task and options. This makes the KFImage APIs closer to the way how SwiftUI code is written. #1586
Add support for TVMonogramView on tvOS. #1571
Some important properties and method in AnimatedImageView.Animator are marked as public now. It provides some useful information of the decoded GIF files. #1575
An AsyncImageDownloadRequestModifier to support modifying the request in an asynchronous way. #1589
Add a .lowDataMode option to support for Low Data Mode. When the .lowDataMode option is provided with an alternative source (usually a low-resolution version of the original image), Kingfisher will respect user's Low Data Mode setting and download the alternative image instead. #1590
Kingfisher.Image, Kingfisher.ImageView or Kingfisher.Button, use the equivalent KFCrossPlatform types (such as KFCrossPlatformImage, etc) instead. Please make sure you do not have any warnings before migrate to Kingfisher v6. For more about the removed deprecated things, check #1525.Kingfisher/SwiftUI subpod (if you are using CocoaPods) or remove the KingfisherSwiftUI target (if you are using Carthage or Swift Package Manager), then reinstall Kingfisher. #1574onSuccess handler not be called when the image is already cached. #1570ImageBinder if it is already on main thread. This prevents unintended flickering when reloading. #1551SessionDelegate an Objective-C name so it can work with other libraries even added by a dependency which generates Objective-C header. #1532List > NavigationLink > HStack hierarchy could crash the app on iOS 14. #1508AVAssetImageDataProvider to generate an image from a remote video asset at a specified time. All the processing gets benefits from current existing Kingfisher technologies, such as cache and image processors. #1500NSTextAttachment to load an image from network for an attachment. #1495AnimatedImageView. This prevents a CGImage rendering issue displaying a static image. #1428.retryStrategy option and associated RetryStrategy to define a highly customizable retry mechanism in Kingfisher. [#1424]DelayRetryStrategy to provide a most common used retry strategy implementation. It simplifies the normal retry requirement when downloading an image from network. #1447RoundCornerImageProcessor in a fraction way. This is useful when you do not know the desire image view size, but still want to clip any received image to a certain round corner ratio (such as a circle for any image). #1443isLoaded binding to KFImage to follow SwiftUI pattern better. #1429.imageModifier option not working on an ImageProvider provided image. #1435KFImage when resizing images with different EXIF orientation other than top. #1396CacheCallbackCoordinator state. #1394@objc attribute to prevent warnings in Xcode 11.4.DefaultCacheSerializer as public and enables the ability of original data caching. #1373DefaultCacheSerializer. #1372contentURL property in ImageDataProvider to provide a URL when it makes sense. #1386Resources without converted to LocalFileImageDataProvider explicitly. #1386KingfisherError.CacheErrorReason to give out the detail error information and reason when a failure happens when caching the file on disk. Check .cannotCreateCacheFile and .cannotSetCacheFileAttribute if you need to handle these errors. #1365Int overflow when calculating expiration duration when a large days value is set for StorageExpiration. #1371repeatCount of AnimatedImageView. Now it can play correct count for an animated image. #1350fromMemoryCacheOrRefresh set. #1351.alternativeSources option to provide a list of alternative image loading Sources. These Sources act as a fallback when the original Source downloading fails where Kingfisher will try to load images from. #1343.waitForCache option now also waits for caching for original image if the .cacheOriginalImage is also set. #1344retrieveImage methods in ImageCache calls its callbackQueue is .mainCurrentOrAsync by default instead of .untouch. It aligns the behavior of other parts in the framework. #1338|> operator for combining image processors. #1320.fade animation applied in the option. Now Kingfisher respect all animations set by users instead of overwriting it internally. #1301KFImage while loading the image. #1293UIImage and UIImageView) on a catalyst project.KFImage to load image asynchronously. KFImage provides a similar interface as View.Image.xcframework and related dSYMs is provided in the release page.diskCacheAccessExtendingExpiration option to give more control of disk cache extending behavior. #1287Kingfisher.Image is now Kingfisher.KFCrossPlatformImage. The similar rules are applied to other cross-platform typealias too, such as Kingfisher.View, Kingfisher.Color and more.taskIdentifier which might cause a crash when using data provider. #1276runLoopMode for AnimatedImageView will trigger animation restart normally. #1253AnimateImageView's frame array is now thread safe. #1257cacheFileURL(forKey:) of DiskStorage to public. #1214KingfisherManager initializer to public so other dependencies can customize the manager behavior. #1216Result extensions for Swift 4 back compatibility are removed. #1224.memoryCacheAccessExtendingExpiration to set a customize expiration extending duration when accessing the image. #1196.progressiveJPEG options passed in. Thanks @lixiang1994 #1181Swift.Result as the default result type when Swift 5.0 or above is applied. #1146maxCachePeriodInSecond of cache would treat 0 as expiring correctly. #1160.up as orientation. #1163ImagePrefetcher. #1150maxCachePeriodInSecond API now expires the cache correctly. #1145ImagePretcher also supports using Source as fetching target. #1142kf wrapper as nonmutating and seperate value/reference version of KingfisherCompatible. This allows mutating properties on kf even with a let declaration. #1134ImagePretcher to load huge ammount of images. #1143ImagePretcher heavily in another thread. #1122Result type based on Swift Result in standard library. Deprecate value and error getter for Kingfisher.Result.ImageCache initializer with path parameter. Now use the cacheDirectoryURL version for clearer implemetation. #1114ImagePrefetchers. #1109directoryURL of disk storage backend is marked as public correctly. #1108ImageDownloadRedirectHandler for intercepting HTTP request which redirects. #1072callbackQueue setting. #1066DownsamplingImageProcessor. #1073Result type to Kingfisher. Now all callbacks in Kingfisher are using Result instead of tuples. This is more future-friendly and provides a modern way to make error handling better.KingfisherError much more elaborate and accurate. Instead of simply provides the error code, now KingfisherError contains error reason and necessary associated values. It will help to understand and track the errors easier.MemoryStorage and DiskStorage as the ImageCache backend.ImageCache is rewritten from scratch, to get benefit from new created MemoryStorage and DiskStorage. At the same time, this hybrid cache abstract keeps most API compatibility from the earlier versions.ImageCache can receive only raw Data object and cache it as needed.KingfisherParsedOptionsInfo type to parse KingfisherOptionsInfoItems in related API. This improves reusability and performance when handling options in Kingfisher.DownsamplingImageProcessor for downsampling an image to a given size before loading it to memory.ImageDataProvider protocol to make it possible to provide image data locally instead of downloading from network. Several concrete types are provided to load images from data format. Use LocalFileImageDataProvider to load an image from a local disk path, Base64ImageDataProvider to load image from a Base64 string representation and RawImageDataProvider to provide a raw Data object.Source protocol to define from where the image should be loaded. Currently, we support to load an image from ImageDataProvider or from network now.ImageDownloader crashing when a lot of downloading tasks running at the same time.KingfisherCompatible uses struct for kf namespacing for better performance.waitForCache option to allowing cache callback called after cache operation finishes. #963.once and .finite(1) the same thing. #982downloadHolder in a serial queue to avoid racing. #984ImageDownloader object completes a downloading request with success or failure. #901cancelAll to cancel all downloading tasks. #894AnimatedImageView to inspect finishing event and/or end of an animation loop. #829final some classes.Box type since Objective-C world takes Any. #832.BlendImageProcessor on iOS/tvOS and CompositingImageProcessor on macOS. #818Array from AnimatedImageView. #819ImageModifier to give a final chance for setting image object related properties just before getting back the image from either network or cache. #810ImageDownloader. #763ImageDownloader delegate method to provide a chance for you to check and modify the data. #773imageChachedType and CacheType.cached instead of isImageCached and CacheCheckResult. #704imageChachedType and CacheType.cached instead of isImageCached and CacheCheckResult. #704backgroundColor property to RoundCornerImageProcessor allowing to specify a desired backgroud color. It could be useful for a JPEG based image to prevent alpha blending. #766UIView or NSView) as placeholder in image view setting extension method. #746UIView or NSView) as placeholder in image view setting extension method. #746keepCurrentImageWhileLoading now will respect your placeholder if the original image is nil in the image view. #747ImageProcessor applied. Now Kingfisher will first try to get the processed images from cache. If not existing, it will be smart enough to check whether the original image exists in cache to avoid downloading it.cacheOriginalImage option to also cache original images while an ImageProcessor is applied. It is required if you want the new cache strategy. #650FormatIndicatedCacheSerializer to serialize the image into a certain format (png, jpg or gif). #693KingfisherManager to let users set a global default option to all KingfisherManager related methods, as well as all UI extension methods. #674KingfisherManager.requestsUsePipeling in ImageDownloader since there was a typo. Now use requestsUsePipelining instead. #673RoundCornerImageProcessor. Instead of making all four corners rounded, you can now set only some corners rounding. #668preloadAllGIFData. Change to a more generic name preloadAllAnimationData since it could be used for other format with ImageProcessor. #664ImageDownloaderDelegate to notify starting of a downloading progress.Resource parameter in image setting extension.CroppingImageProcessor and crop method of images which crops wrong area for images with a non-1 scale. #649ResizingImageProcessor. targetSize of ResizingImageProcessor is now deprecated. Use referenceSize instead. It's just a name changing for clearer API. #646ImageCache. #620Image. #611aspectFill, aspectFit or just respect the target size. #597onlyLoadFirstFrame option to load only the first frame from a GIF file. It will be useful when you want to display a static preview of the first frame from a GIF image. By doing so, you could save huge ammount of memory. #591cancel on a RetrieveImageTask will work properly even when the downloading not started for UIButton and NSButton too. #580ImagePrefetcher trying to prefetch images with an ImageProcessor. Now the fetched and processed images could be retrieved correctly. #590cancel on a RetrieveImageTask will work properly even when the downloading not started. #578pngRepresentation, jpegRepresentation and gifRepresentation as public. #560CGContext for blur filter. #567pngRepresentation, jpegRepresentation and gifRepresentation as public. #560CGContext for blur filter. #567ImageDownloader a pure Swift class to avoid the SDK bug which might leak memory in iOS 10. #520KingfisherOptionsInfo extension helpers to extract options easiser. It will be useful when you are trying to implement your own processors or serializers. #505public. #508nil. This is a regression from version 3.2.0. #510open to their class defination scope, to avoid the compiler restriction when overridden. #500CIImageProcessor not get called when feeding data to the processor. #485ImageDownloader is removed to prevent leading to misunderstanding.ImageProcessor at the same time for an image, while keeping high performance since only one downloading process would be fired. #460ResizingImageProcessor and OverlayImageProcessor while the input images not having a standard format. #440, #461kf namespace for all extension APIs in Kingfisher. Now no need to worry about name conflicting any more. #435AnimateImageView to open so you can extend this class again. #442kf namespace is added, all original kf_ prefix methods are marked as deprecated.ImageResource for your original Resource type. And now URL conforms Resource so the APIs could be clearer.ImageProcessor. If this is not what you want, you should supply your customized instanse of CacheSerializer.ImageCache is removed since it introduced unnecessary coupling. Use isImageCached instead.is removed. Use.requestModifierand pass aImageDownloadRequestModifier`.kf_indicatorType.ImageResource for your original Resource type. And now URL conforms Resource so the APIs could be clearer.ImageProcessor. If this is not what you want, you should supply your customized instanse of CacheSerializer.nil as valid URL parameter for image view's extension methods.self is released.ForceTransition) to force image setting for an image view with transition. By default the transition will only happen when downloaded. #317AnimatedImageView to reduce memory usage when parsing and displaying GIF images. See README for more about using Kingfisher for GIF images. #300UIImage. #278ImagePrefetcher and related prefetching methods to allow downloading and caching images before you need to display them. #249AuthenticationChallengeResponable) for responsing authentication challenge. You can now set authenticationChallengeResponder of ImageDownloader and use your own authentication policy. #226cachePathForKey(:)) to get real path for a specified key in a cache. #256ImageCache when an empty image is passed into.requestsUsePipeling in ImageDownloader. #253callbackDispatchQueue in option should be applied to ImageDownloader as well. #238 and #240NSImage. #201KingfisherOptionsInfo API. Now all options across the framework are represented by KingfisherOptionsInfo with type same behavior. #194ImageDownloader now returns a cancelable task. So you can cancel the downloading process when using downloader separately.NSURLErrorCancelled correctly now.UIImageView extension.WKInterfaceImage.ForceRefresh behavior to respect server response when got a 304.Options to OptionsInfo for flexible options passing.KingfisherOptions are deprecated now. Use KingfisherOptionsInfo instead.First public release.