Open Source Swift Library for Image Editing & Processing

Free Swift API that allows to customize image pipeline, resize images, use a custom processor, round image corners, download, and cash images & so on.

Nuke is a useful open source Swift framework that enables software developers to easily load and display images inside their own Swift applications. It requires just one line code to download and display images in your apps. The library has also included support for several advanced features such as image preheating and progressive decoding that can dramatically enhance the performance of the app as well user experience.

Nuke API is easy to use and has a advanced architecture that enables software developers to think of virtually unlimited possibilities for image processing and customization. It has included built-in support for basic image formats such as JPEG, PNG, HEIF, and many more. It also supports image encoding and decoding using Swift code.

The library is feature-rich and has included several important features for handling their images using Swift commands, such as load images, customize image pipeline, resize images, apply filters like Gaussian blur, use a custom processor, round image corners, LRU Memory Cache, HTTP Disk Cache, Aggressive LRU Disk Cache, Reloading Images, image animation, Smart background decompression, downloads Resuming, Request prioritization, Low data mode and many more.

Previous Next

Getting Started with Nuke

The recommended way to install Nuke is using CocoaPods. Please add the following lines to your Podfile

Install Nuke via CocoaPods.

pod"Nuke-Alamofire-Plugin" # optional
pod"Nuke-AnimatedImage-Plugin" # optional

Clone the latest sources using the following command.

Install Nuke via GitHub.

$ git 

Download & Use Images using Swift

The open source Nuke API provides a well-organized and effective way for downloading and using images inside your Swift apps. To fetch the images you need to pass the URL of the required image and then call the resume method. It will download the requested image in the background and will inform the response closure when it’s done.

Preheat Image using Swift API

Preheating is a useful feature that enables users to download the image or other data ahead of time in anticipation of its use. The apps can download it and store it in the application’s network cache. Later when you need to view the image the response to your request will come back from the cache instead of the network. The open source API Nuke supports an exciting feature known as preheating images using Swift code. Please remember that preheating can takes up users' data and puts extra pressure on the CPU as well as memory. To reduce this pressure you can choose only the disk cache as the prefetching destination.

Load and Cash Images via Swift

Image caching is a useful method that improves application performance and end-user experience. The open source Nuke API enables software apps to automatically cache the downloaded images. Nuke relies on two built-in caching layers. The first one is used to store processed image, which is ready for display. It uses the LRU algorithm – the least recently used entries are removed first during the sweep. The 2nd one uses HTTP Disk Cache to store the unprocessed image data. It is also possible to check the existence of the requested image in the cache.