talira

SDWebImageSwiftUI

SwiftUI image loading and animation framework powered by SDWebImage

open sourceMITfree

SDWebImageSwiftUI is a SwiftUI image loading framework built on SDWebImage. Its WebImage and AnimatedImage views follow SwiftUI's Image API and bring SDWebImage's async loading, memory and disk caching, progressive loading and animated image playback, with SwiftUI bindings and view modifiers. Its README says the 3.x line is the last in this repository: with SDWebImage 6.0 it moves into SDWebImage's core repository, keeping the SDWebImageSwiftUI module name.

Problems it solves

  • load images from URLs in a SwiftUI app with caching so they don't download again
  • play animated GIFs and WebP images in SwiftUI views
  • show a placeholder and progress while a remote image loads in SwiftUI
  • cache downloaded images in memory and on disk for my SwiftUI views

Features

  • WebImage and AnimatedImage views matching SwiftUI's Image API
  • async image loading with memory and disk caching
  • progressive loading and animated image playback
  • image transformers, request and response modifiers
  • more formats (WebP, HEIF, AVIF, SVG and others) through SDWebImage's coder plugins

Limitations

  • Needs iOS 14, macOS 11, tvOS 14 or watchOS 7 or newer; for iOS 13, use the 2.x versions1
  • On visionOS it builds only through Xcode's own package dependencies, not CocoaPods or Swift Package Manager1

Alternatives

The same job

These do what SDWebImageSwiftUI does.

  1. Kingfisher A lightweight, pure-Swift library for downloading and caching images from the web
  2. Nuke Powerful image loading system
  3. SDWebImage Asynchronous image downloading and caching for iOS, macOS, tvOS, watchOS and visionOS
  4. AlamofireImage Image downloading, caching and filters for Alamofire

Compare SDWebImageSwiftUI with the top 3