Image Loading System
Serving Images Since 2015
Load images from different sources and display them in your app using simple and flexible APIs. Take advantage of the powerful image processing capabilities and a robust caching system.
The framework is lean and has an automated test suite 2x the codebase size, ensuring excellent reliability. Nuke is optimized for performance, and its advanced architecture enables virtually unlimited possibilities for customization.
Memory and Disk Cache · Image Processing & Decompression · Request Coalescing & Priority · Prefetching · Resumable Downloads · Progressive JPEG · HEIF, WebP, GIF · Animated Images · SwiftUI · Async/Await
Sponsors
Usage
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. The demo app in this repo covers the rest: open Nuke.xcodeproj and run the NukeDemo scheme.
Installation
Nuke supports Swift Package Manager.
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), LazyImageView and ImageLoader (UIKit, AppKit) |
| NukeExtensions | The extensions for UIImageView (UIKit, AppKit). Soft-deprecated: use ImageLoader from NukeUI |
| NukeVideo | The components for decoding and playing short videos |
AI Agents
Nuke ships with what a coding agent needs to use its current API, and not the one it remembers.
-
Skills: nuke-optimize measures and fixes slow images, and nuke-migrate upgrades an app to Nuke 14, including what the compiler can't report. In Claude Code, run the commands below. For other agents, copy the folders to .agents/skills/ in your project.
/plugin marketplace add kean/Nuke
/plugin install nuke@nuke
-
Docs: llms.txt, llms-full.txt, and llms-api.txt. They're also in your project's checkout of the package, at the version you resolved.
-
Debugging: launch with NUKE_DIAGNOSTICS_LOG=1 to get a line in the console for every task, or run po ImagePipeline.shared.diagnostics in the debugger. See Troubleshooting.
-
Contributing: AGENTS.md has the commands and the conventions for working on Nuke itself.
Extensions
The image pipeline is easy to customize and extend. Check out the following first-class extensions and packages built by the community. None of them resolves against Nuke 14 yet: the Status column has the versions each one supports.