Changelog History
Page 4
-
v8.2.0 Changes
September 21, 2019- โ Add support for Mac Catalyst โ #299, Jonathan Downing
-
v8.1.1 Changes
September 01, 2019- ๐ฆ Switch to a versioning scheme which is compatible with Swift Package Manager
-
v8.1 Changes
August 25, 2019- ๐ง Configure dispatch queues with proper QoS โ #291
- โ Remove synchronization points in
ImageDecoderwhich is not needed starting from iOS 10 โ #277 - โ Add Swift Package Manager to Installation Guides
- ๐ Improve Travis CI setup: run tests on multiple Xcode versions, run thread safety tests, run SwiftLint validations, build demo project, validate Swift package โ #279, #280, #281, #284, #285
-
v8.0.1 Changes
July 21, 2019- โ Remove synchronization in
ImageDecoderwhich is no longer needed โ #277
- โ Remove synchronization in
-
v8.0 Changes
July 08, 2019๐ Nuke 8 is the most powerful, performant, and refined release yet. It contains major advancements it some areas and brings some great new features.
Cache processed images on disk ยท New built-in image processors ยท ImagePipeline v2 ยท Up to 30% faster main thread performance ยท
Resulttype ยท Improved deduplication ยทos_signpostintegration ยท Refined ImageRequest API ยท Smart decompression ยท Entirely new documentation๐ Most of the Nuke APIs are source compatible with Nuke 7. There is also a Nuke 8 Migration Guide to help with migration.
Image Processing
#227 Cache Processed Images on Disk
๐
ImagePipelinenow supports caching of processed images on disk. To enable this feature setisDataCacheForProcessedDataEnabledtotruein the pipeline configuration and provide adataCache. You can use a built-inDataCacheintroduced in Nuke 7.3 or write a custom one.Image cache can significantly improve the user experience in the apps that use heavy image processors like Gaussian Blur.
#243 New Image Processors
Nuke now ships with a bunch of built-in image processors including:
ImageProcessor.ResizeImageProcessor.RoundedCornersImageProcessor.CircleImageProcessor.GaussianBlurImageProcessor.CoreImageFilter
There are also
ImageProcessor.Anonymousto create one-off processors from closures andImageProcessor.Compositionto combine two or more processors.#245 Simplified Processing API
๐ Previously Nuke offered multiple different ways to add processors to the request. Now there is only one, which is also better than all of the previous versions:
let request = ImageRequest( url: URL(string: "http://..."), processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44), crop: true), ImageProcessor.RoundedCorners(radius: 16)] )Processors can also be set using a respective mutable
processorsproperty.Notice that
AnyImageProcessoris gone! You can simply useImageProcessingprotocol directly in places where previously you had to use a type-erased version.#229 Smart Decompression
0๏ธโฃ In the previous versions, decompression was part of the processing API and
ImageDecompressorwas the default processor set for each image request. This was mostly done to simplify implementation but it was confusing for the users.In the new version, decompression runs automatically and it no longer a "processor". The new decompression is also smarter. It runs only when needed โ when we know that image is still in a compressed format and wasn't decompressed by one of the image processors.
๐ง Decompression runs on a new separate
imageDecompressingQueue. To disable decompression you can set a newisDecompressionEnabledpipeline configuration option tofalse.#247 Avoiding Duplicated Work when Applying Processors
The pipeline avoids doing any duplicated work when loading images. Now it also avoids applying the same processors more than once. For example, let's take these two requests:
let url = URL(string: "http://example.com/image") pipeline.loadImage(with: ImageRequest(url: url, processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44)), ImageProcessor.GaussianBlur(radius: 8)])) pipeline.loadImage(with: ImageRequest(url: url, processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44))]))Nuke will load the image data only once, resize the image once and apply the blur also only once. There is no duplicated work done at any stage. If any of the intermediate results are available in the data cache, they will be used.
ImagePipeline v2
Nuke 8 introduced a major new iteration of the
ImagePipelineclass. The class was introduced in Nuke 7 and it contained a lot of incidental complexity due to addition of progressive decoding and some other new features. In Nuke 8 it was rewritten to fully embrace progressive decoding. The new pipeline is smaller, simpler, easier to maintain, and more reliable.It is also faster.
๐ +30% Main Thread Performance
The image pipeline spends even less time on the main thread than any of the previous versions. It's up to 30% faster than Nuke 7.
#239 Load Image Data
โ Add a new
ImagePipelinemethod to fetch original image data:@discardableResultpublic func loadData(with request: ImageRequest, progress: ((\_ completed: Int64, \_ total: Int64) -\> Void)? = nil, completion: @escaping (Result\<(data: Data, response: URLResponse?), ImagePipeline.Error\>) -\> Void) -\> ImageTask๐ This method now powers
ImagePreheaterwith destination.diskCacheintroduced in Nuke 7.4 (previously it was powered by a hacky internal API).#245 Improved ImageRequest API
The rarely used options were extracted into the new
ImageRequestOptionsstruct and the request initializer can now be used to customize all of the request parameters.#255
filteredURLYou can now provide a
filteredURLto be used as a key for caching in case the URL contains transient query parameters:let request = ImageRequest( url: URL(string: "http://example.com/image.jpeg?token=123")!, options: ImageRequestOptions( filteredURL: "http://example.com/image.jpeg" ) )#241 Adopt
ResulttypeAdopt the
Resulttype introduced in Swift 5. So instead of having a separateresponseanderrorparameters, the completion closure now has only one parameter -result.public typealias Completion = (\_ result: Result\<ImageResponse, ImagePipeline.Error\>) -\> Void๐ Performance
๐ Apart from the general performance improvements Nuke now also offers a great way to measure performance and gain visiblity into how the system behaves when loading images.
#250 Integrate
os_signpostโ Integrate os_signpost logs for measuring performance. To enable the logs set
ImagePipeline.Configuration.isSignpostLoggingEnabled(static property) totruebefore accessing thesharedpipeline.๐ With these logs, you have visibility into the image pipeline. For more information see WWDC 2018: Measuring Performance Using Logging which explains
os_signpostin a great detail.๐ Documentation
๐ All the documentation for Nuke was rewritten from scratch in Nuke 8. It's now more concise, clear, and it even features some fantastic illustrations:
The screenshots come the the reworked demo project. It gained new demos including Image Processing demo and also a way to change
ImagePipelineconfiguration in runtime.Misc
- โ Add a cleaner way to set
ImageTaskpriority using a newpriorityproperty โ #251 - ๐ [macOS] Implement image cost calculation for
ImageCacheโ #236 - ๐ [watchOS] Add
WKInterfaceImagesupport - ๐ Future-proof Objective-C
ImageDisplayingprotocol by addingnuke_prefixes to avoid clashes in Objective-C runtime - โ Add convenience
func decode(data: Data) -> Image?method with a defaultisFinalargument toImageDecodingprotocol โ e3ca5e - โ Add convenience
func process(image: Image) -> Image?method toImageProcessingprotocol DataCachewill now automatically re-create its root directory if it was deleted underneath it- โ Add public
flushmethod toDataCache
-
v8.0-rc.1 Changes
June 12, 2019๐ Nuke 8 is the most powerful, performant, and refined release yet. It contains major advancements it some areas and brings some great new features. One of the highlights of this release is the documentation which was rewritten from the ground up.
Cache processed images on disk ยท New built-in image processors ยท ImagePipeline v2 ยท Up to 30% faster main thread performance ยท
Resulttype ยท Improved deduplication ยทos_signpostintegration ยท Refined ImageRequest API ยท Smart decompression ยท Entirely new documentation๐ Most of the Nuke APIs are source compatible with Nuke 7. There is also a Nuke 8 Migration Guide to help with migration.
Image Processing
#227 Cache Processed Images on Disk
๐
ImagePipelinenow supports caching of processed images on disk. To enable this feature setisDataCacheForProcessedDataEnabledtotruein the pipeline configuration and provide adataCache. You can use a built-inDataCacheintroduced in Nuke 7.3 or write a custom one.Image cache can significantly improve the user experience in the apps that use heavy image processors like Gaussian Blur.
#243 New Image Processors
Nuke now ships with a bunch of built-in image processors including:
ImageProcessor.ResizeImageProcessor.RoundedCornersImageProcessor.CircleImageProcessor.GaussianBlurImageProcessor.CoreImageFilter
There are also
ImageProcessor.Anonymousto create one-off processors from closures andImageProcessor.Compositionto combine two or more processors.#245 Simplified Processing API
๐ Previously Nuke offered multiple different ways to add processors to the request. Now there is only one, which is also better than all of the previous versions:
let request = ImageRequest( url: URL(string: "http://..."), processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44), crop: true), ImageProcessor.RoundedCorners(radius: 16)] )Processors can also be set using a respective mutable
processorsproperty.Notice that
AnyImageProcessoris gone! You can simply useImageProcessingprotocol directly in places where previously you had to use a type-erased version.#229 Smart Decompression
0๏ธโฃ In the previous versions, decompression was part of the processing API and
ImageDecompressorwas the default processor set for each image request. This was mostly done to simplify implementation but it was confusing for the users.In the new version, decompression runs automatically and it no longer a "processor". The new decompression is also smarter. It runs only when needed โ when we know that image is still in a compressed format and wasn't decompressed by one of the image processors.
๐ง Decompression runs on a new separate
imageDecompressingQueue. To disable decompression you can set a newisDecompressionEnabledpipeline configuration option tofalse.#247 Avoiding Duplicated Work when Applying Processors
The pipeline avoids doing any duplicated work when loading images. Now it also avoids applying the same processors more than once. For example, let's take these two requests:
let url = URL(string: "http://example.com/image") pipeline.loadImage(with: ImageRequest(url: url, processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44)), ImageProcessor.GaussianBlur(radius: 8)])) pipeline.loadImage(with: ImageRequest(url: url, processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44))]))Nuke will load the image data only once, resize the image once and apply the blur also only once. There is no duplicated work done at any stage. If any of the intermediate results are available in the data cache, they will be used.
ImagePipeline v2
Nuke 8 introduced a major new iteration of the
ImagePipelineclass. The class was introduced in Nuke 7 and it contained a lot of incidental complexity due to addition of progressive decoding and some other new features. In Nuke 8 it was rewritten to fully embrace progressive decoding. The new pipeline is smaller, simpler, easier to maintain, and more reliable.It is also faster.
๐ +30% Main Thread Performance
The image pipeline spends even less time on the main thread than any of the previous versions. It's up to 30% faster than Nuke 7.
#239 Load Image Data
โ Add a new
ImagePipelinemethod to fetch original image data:@discardableResultpublic func loadData(with request: ImageRequest, progress: ((\_ completed: Int64, \_ total: Int64) -\> Void)? = nil, completion: @escaping (Result\<(data: Data, response: URLResponse?), ImagePipeline.Error\>) -\> Void) -\> ImageTask๐ This method now powers
ImagePreheaterwith destination.diskCacheintroduced in Nuke 7.4 (previously it was powered by a hacky internal API).#245 Improved ImageRequest API
The rarely used options were extracted into the new
ImageRequestOptionsstruct and the request initializer can now be used to customize all of the request parameters.#255
filteredURLYou can now provide a
filteredURLto be used as a key for caching in case the URL contains transient query parameters:let request = ImageRequest( url: URL(string: "http://example.com/image.jpeg?token=123")!, options: ImageRequestOptions( filteredURL: "http://example.com/image.jpeg" ) )#241 Adopt
ResulttypeAdopt the
Resulttype introduced in Swift 5. So instead of having a separateresponseanderrorparameters, the completion closure now has only one parameter -result.public typealias Completion = (\_ result: Result\<ImageResponse, ImagePipeline.Error\>) -\> Void๐ Performance
๐ Apart from the general performance improvements Nuke now also offers a great way to measure performance and gain visiblity into how the system behaves when loading images.
#250 Integrate
os_signpostโ Integrate os_signpost logs for measuring performance. To enable the logs set
ImagePipeline.Configuration.isSignpostLoggingEnabled(static property) totruebefore accessing thesharedpipeline.๐ With these logs, you have visibility into the image pipeline. For more information see WWDC 2018: Measuring Performance Using Logging which explains
os_signpostin a great detail.๐ Documentation
๐ All the documentation for Nuke was rewritten from scratch in Nuke 8. It's now more concise, clear, and it even features some fantastic illustrations:
The screenshots come the the reworked demo project. It gained new demos including Image Processing demo and also a way to change
ImagePipelineconfiguration in runtime.Misc
- โ Add a cleaner way to set
ImageTaskpriority using a newpriorityproperty โ #251 - ๐ [macOS] Implement image cost calculation for
ImageCacheโ #236 - ๐ [watchOS] Add
WKInterfaceImagesupport - ๐ Future-proof Objective-C
ImageDisplayingprotocol by addingnuke_prefixes to avoid clashes in Objective-C runtime - โ Add convenience
func decode(data: Data) -> Image?method with a defaultisFinalargument toImageDecodingprotocol โ e3ca5e - โ Add convenience
func process(image: Image) -> Image?method toImageProcessingprotocol DataCachewill now automatically re-create its root directory if it was deleted underneath it- โ Add public
flushmethod toDataCache
-
v8.0-beta.4 Changes
June 07, 2019A small bump to address the feedback from Nuke 8.0-beta.3.
- ๐ Improve debug descriptions for processors, adopt reverse DNS notation for cache keys
- โช Revert the changes made in #254 Improve image view extensions. There is going to be no major changes in the primary
Nuke.loadImage(:)API in Nuke 8. The extensions are going to be revisited when addingSwiftUIandCombinesupport. - ๐ Tune the performance, now we can safely say there is a +25% improvement in some of the common use cases on the main thread.
- ๐ [Documentation] Update some of the documentation
- ๐ง [Demo] Add a Settings screen to the demo project to allow change ImagePipeline configuration in runtime
-
v8.0-beta.3 Changes
June 02, 2019#257 Image Processing Improvements
- ๐จ Refactor the existing processors
- โ Add new
ImageProcessor.Crop, previously cropping was an option inImageProcessor.Resizeand there was a known defect when cropping images smaller than the target size which is fixed in the new implementation - ๐ Make
ImageProcessor.ResizeandImageProcessor.Cropavailable on macOS - โ Add
CustomStringConvertibleimplementations for each image processor - โ Add documentation for image processors
โช #259 Revert Addition of ImageTaskDelegate
- ๐
ImageTaskDelegatewas a new API introduced in Nuke 8.0-beta.1 to improve the pipeline performance. After some extensive profiling it was clear that this change wasn't truly worth the increased complexity and the changes in the established public API, thus this change was reverted.
-
v8.0-beta.2 Changes
June 01, 2019โก๏ธ There quite a few important changes in this update. Probably the most important one is the addition of Deprecated.swift file which eases the transition from Nuke 7 to Nuke 8 which are now almost completely source compatible.
๐ > Naturally, this beta includes everything from Nuke 8.0-beta.1.
#250 Integrate
os_signpostfor profilingโ Integrate os_signpost logs for measuring performance. To enable the logs set
ImagePipeline.Configuration.isSignpostLoggingEnabled(static property) totruebefore accessing thesharedpipeline.๐ With these logs, you have visibility into the image pipeline. For more information see WWDC 2018: Measuring Performance Using Logging which explains
os_signpostin a great detail.#254 Improve Image Loading Extensions
โ Add
imageView.nk.setImage(with:)family of methods as a replacement forNuke.loadImage(with:into:). The latter wasn't grammatically correct, that's the first.setImage(with:)methods are also more conventional. So now in order to load an image and display it in a view you would simply do this:imageView.nk.setImage(with: URL(string: "http://example.com/image.jpeg")!)
๐ Future-proof Objective-C
ImageDisplayingprotocol by addingnuke_prefixes to avoid clashes in Objective-C runtimeโ Add
WKInterfaceImagesupport
Other Changes
- 0๏ธโฃ Enable processing deduplication by default โ #252
- โ Add
filterURLoptions toImageRequestOptionsto filter unwanted query parameters when generating cache keys - #255 - โ Add Deprecated.swift file to ease transition from Nuke 7 to Nuke 8 - #253
- ๐ Implement image cost calculation in ImageCache for macOS โ #236
- โ Add a cleaner way to set
ImageTaskpriority using a newpriorityproperty โ #251 - โ Add convenience
func decode(data: Data)method with a defaultisFinalargument toImageDecodingprotocol โ e3ca5e DataCachewill now automatically re-create its root directory if it was deleted underneath it
-
v8.0-beta.1 Changes
May 23, 2019๐ This is the first Nuke 8 beta. There is going to be at least one more beta released in June updated according to your feedback.
Image Processing Improvements
#227 Caching Processed Images
๐
ImagePipelinenow supports caching of processed images. To enable this feature setisDataCacheForProcessedDataEnabledtotruein the pipeline configuration and provide adataCache. You can use a built-inDataCacheintroduced in Nuke 7.3 which supports parallel reads, and instant writes.Image cache can significantly improve the user experience in the apps that use heavy image processors like Gaussian Blur.
#243 Add Image Processors
โ Add the following image processors:
ImageProcessor.ResizeImageProcessor.RoundedCornersImageProcessor.CircleImageProcessor.GaussianBlurImageProcessor.CoreImageFilter
๐ More processors will be added in the upcoming releases.
#245 Simplified Processing API
๐ Previously there were quite a few different ways to add processors to the request. Now there is only one, which is also better than all of the previous versions:
let request = ImageRequest( url: URL(string: "http://..."), processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44), crop: true), ImageProcessor.RoundedCorners(radius: 16)] )Processors can also be set using a respective mutable
processorsproperty.๐ Notice that
AnyImageProcessoris also finally gone. You can just useImageProcessingprotocol directly everywhere.#229 Smart Decompression
0๏ธโฃ In the previous versions, the decompression was part of the processing API and
ImageDecompressorwas the default processor set for each image request. This was mostly done to simplify implementation but it was confusing for the users.In the new solution, decompression runs automatically and no longer conflicts with the other processors that you set on the request.
The new decompression is also smarter. It runs only when needed: either if there are no processors provided in the request or when these processors didn't change the original image in any way (e.g.
ImageProcessor.Resizedecided not to upscale the image). Decompression also runs after reading the processed image from disk.Decompression runs on a new separate
imageDecompressingQueue. To disable it setisDecompressionEnabledtofalse.#247 Avoiding Duplicated Work when Applying Processors (Experimental)
0๏ธโฃ An experimental feature disabled by default. To enabled it, set
isProcessingDeduplicationEnabledtotrue. When enabled, the pipeline will avoid any duplicated work when processing images. For example, let's take the following requests:let url = URL(string: "http://example.com/image") pipeline.loadImage(with: ImageRequest(url: url, processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44)), ImageProcessor.GaussianBlur(radius: 8)])) pipeline.loadImage(with: ImageRequest(url: url, processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44))]))Nuke will load the image data only once, resize the image once and apply the blur also only once. There is no duplicated work done at any stage. If any of the intermediate results are available in the data cache, they will be used.
ImagePipeline v2
Nuke 8 introduced a major new iteration of the
ImagePipelineclass. It was completely rewritten to embrace progressive decoding and deduplication introduced in Nuke 7.The new pipeline is smaller, simpler, easier to maintain, and more reliable than the previous iteration. It is powered by a new internal
Taskabstraction which is extremely powerful.๐ Up to 30% Faster Main Thread Performance
With some of the changed introduced in the pipeline, the primary
Nuke.loadImage(with:into:)method became even faster than any of the previous versions on the main thread, up to 30% faster.#237 Add ImageTaskDelegate
Extend
ImagePipelineAPI with a new method:public func imageTask(with request: ImageRequest, delegate: ImageTaskDelegate) -\> ImageTaskThis API is meant to be used for advanced features like progressive image decoding. It is also one of the primary reasons why the pipeline is so much faster in Nuke 8.
#239 Load Image Data
โ Add a new
ImagePipelinemethod to fetch original image data:@discardableResultpublic func loadData(with request: ImageRequest, progress: ((\_ completed: Int64, \_ total: Int64) -\> Void)? = nil, completion: @escaping (Result\<(data: Data, response: URLResponse?), ImagePipeline.Error\>) -\> Void) -\> ImageTask๐ This method now powers
ImagePreheaterwith destination.diskCacheintroduced in Nuke 7.4 (previously it was powered by a hacky internal API).#245 Improved ImageRequest API
The rarely used options were extracted into new
ImageRequestOptionsstruct and the processor initializer can now be used to customize all of the request parameters.#241 Adopt
ResulttypeAdopt the
Resulttype introduced in Swift 5. So instead of having a separateresponseanderrorparameters, the completion closure now has only one parameter -result.public typealias Completion = (\_ result: Result\<ImageResponse, ImagePipeline.Error\>) -\> VoidFuture Improvements
๐ There are a few improvements planned for Nuke 8 but which are still in the progress including new performance metrics, new ways to customize cache keys, more processors, more API refinements.
๐ The documentation, the demos, and the migrations guides are also be updated later and available with RC.

