Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/NukePublic

Image loading system

License

NotificationsYou must be signed in to change notification settings

kean/Nuke

Repository files navigation


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 compiles in under 2 seconds¹. It has an automated test suite 2x the codebase size, ensuring excellent reliability. Nuke is optimized forperformance, 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 ·SwiftUI ·Async/Await

Sponsors

Lapse: friendsnot followers.

Lapse Logo

Nuke is also supported by:

Proxyman Logo

Proxyman

Backspace Travel

Backspace Travel

Installation

Nuke supportsSwift Package Manager, which is the recommended option. If that doesn't work for you, you can use binary frameworks attached to thereleases.

The package ships with four modules that you can install depending on your needs:

ModuleDescription
NukeThe lean core framework withImagePipeline,ImageRequest, and more
NukeUIThe UI components:LazyImage (SwiftUI) andImageView (UIKit, AppKit)
NukeExtensionsThe extensions forUIImageView (UIKit, AppKit)
NukeVideoThe components for decoding and playing short videos

Documentation

Nuke is easy to learn and use, thanks to its extensive documentation and a modern API.

You can load images usingImagePipeline from the lean coreNuke module:

func loadImage()asyncthrows{letimageTask=ImagePipeline.shared.imageTask(with: url)forawaitprogressin imageTask.progress{        // Update progress}    imageView.image=tryawait imageTask.image}

Or you can use the built-in UI components from theNukeUI module:

structContentView:View{varbody:someView{LazyImage(url:URL(string:"https://example.com/image.jpeg"))}}

TheGetting Started guide is the best place to start learning about these and many other APIs provided by the framework. Check outNuke Demo for more usage examples.

Nuke Docs

Extensions

The image pipeline is easy to customize and extend. Check out the following first-class extensions and packages built by the community.

NameDescription
Alamofire PluginReplace networking layer withAlamofire
NukeWebPCommunity.WebP support, built byMaxim Kolesnik
WebP PluginCommunity.WebP support, built byRyo Kosuge
AVIF PluginCommunity.AVIF support, built byDenis
RxNukeRxSwift extensions for Nuke with examples

Looking for a way to log your network requests, including image requests? Check outPulse.

Minimum Requirements

Upgrading from the previous version? Use aMigration Guide.

NukeDateSwiftXcodePlatforms
Nuke 12.0Mar 4, 2023Swift 5.7Xcode 15.0iOS 13.0, watchOS 6.0, macOS 10.15, tvOS 13.0
Nuke 11.0Jul 20, 2022Swift 5.6Xcode 13.3iOS 13.0, watchOS 6.0, macOS 10.15, tvOS 13.0
Nuke 10.0Jun 1, 2021Swift 5.3Xcode 12.0iOS 11.0, watchOS 4.0, macOS 10.13, tvOS 11.0

Starting with version 12.3, Nuke also ships with visionOS support (in beta)

License

Nuke is available under the MIT license. See the LICENSE file for more info.


¹ Measured on MacBook Pro 14" 2021 (10-core M1 Pro)


[8]ページ先頭

©2009-2025 Movatter.jp