talira

Kingfisher

A lightweight, pure-Swift library for downloading and caching images from the web

open sourceMITfree

Kingfisher is a pure-Swift library for downloading and caching images from the web in iOS, macOS, tvOS, watchOS and visionOS apps, with SwiftUI support and extensions that set an image view's image from a URL in one line. It caches in memory and on disk with configurable expiry and size limits, reuses and cancels downloads, prefetches images, and applies image processors and filters, with placeholders, loading indicators and transitions. The downloader, cache and processors can be used separately, and it supports Low Data Mode, Live Photos and Swift 6 strict concurrency. Wei Wang (onevcat) maintains it; 8.16.0 is its last CocoaPods release, and new versions ship through Swift Package Manager.

Problems it solves

  • load and cache remote images in my SwiftUI app
  • show images from URLs in a UITableView without stutter
  • resize or round images after downloading them in iOS
  • replace SDWebImage with a Swift-native library

Features

  • download and cache images from URLs in Swift apps
  • memory and disk cache with expiry and size limits
  • SwiftUI and UIKit/AppKit image view extensions
  • image processors and filters
  • prefetching
  • placeholders, loading indicators and transitions
  • cancellable, de-duplicated downloads
  • Low Data Mode and Live Photo support

Limitations

  • No longer published to CocoaPods: 8.16.0 is the last version there; newer releases come through Swift Package Manager or the pre-built framework.1

Alternatives

The same job

These do what Kingfisher does.

  1. SDWebImageSwiftUI SwiftUI image loading and animation framework powered by SDWebImage
  2. SDWebImage Asynchronous image downloading and caching for iOS, macOS, tvOS, watchOS and visionOS
  3. Nuke Powerful image loading system
  4. AlamofireImage Image downloading, caching and filters for Alamofire

Compare Kingfisher with the top 3