kean/nuke
> *Serving Images Since 2015*
Sponsors
<table> <tr> <td valign="center" align="center"> <a href="https://proxyman.io"> <img src="https://kean.blog/images/logos/proxyman.png" height="50px" alt="Proxyman Logo"> <p>Proxyman</p> </a> </td> </tr> </table>
Documentation
Load images using ImagePipeline from the lean core Nuke module:
func loadImage() async throws {
let imageTask = ImagePipeline.shared.imageTask(with: url)
for await progress in imageTask.progress {
// Update progress
}
imageView.image = try await imageTask.image
}Or use the built-in UI components from NukeUI:
struct ContentView: View {
var body: some View {
LazyImage(url: URL(string: "https://example.com/image.jpeg"))
}
}The Getting Started guide is the best place to start. Check out Nuke Demo for more examples.
<a href="https://kean-docs.github.io/nuke/documentation/nuke/getting-started"> <img width="690" alt="Nuke Docs" src="https://user-images.githubusercontent.com/1567433/175793167-b7e0c557-b887-444f-b18a-57d6f5ecf01a.png"> </a>
Installation
Nuke supports Swift Package Manager, which is the recommended option. If that doesn't work for you, you can use binary frameworks attached to the releases.
The package ships with four modules that you can install depending on your needs:
|Module|Description| |--|--| |Nuke|The lean core framework with ImagePipeline, ImageRequest, and more| |NukeUI|The UI components: LazyImage (SwiftUI) and ImageView (UIKit, AppKit)| |NukeExtensions|The extensions for UIImageView (UIKit, AppKit)| |NukeVideo|The components for decoding and playing short videos|
Extensions
The image pipeline is easy to customize and extend. Check out the following first-class extensions and packages built by the community.
|Name|Description| |--|--| |Alamofire Plugin|Replace networking layer with Alamofire| |NukeWebP| Community. WebP support, built by Maxim Kolesnik| |WebP Plugin| Community. WebP support, built by Ryo Kosuge| |AVIF Plugin| Community. AVIF support, built by Denis| |RxNuke|RxSwift extensions for Nuke with examples|
Looking for a way to log your network requests, including image requests? Check out Pulse.
Minimum Requirements
Upgrading from the previous version? Use a Migration Guide.
| Nuke | Swift | Xcode | Platforms | |-----------|-----------|------------|-------------------------------------------------------------| | Nuke 13.0 | Swift 6.2 | Xcode 26.0 | iOS 15.0, watchOS 8.0, macOS 12.0, tvOS 13.0, visionOS 1.0 | | Nuke 12.0 | Swift 5.7 | Xcode 15.0 | iOS 13.0, watchOS 6.0, macOS 10.15, tvOS 13.0 |
License
Nuke is available under the MIT license. See the LICENSE file for more info.
<a name="footnote-1">¹</a> Measured on MacBook Pro 14" 2021 (10-core M1 Pro)
Package Metadata
Repository: kean/nuke
Default branch: main
README: README.md