How onevcat/kingfisher works
Kingfisher is a Swift image-loading library. An app supplies a URL or local data source through a platform view extension or SwiftUI image; the manager coordinates retrieval, processing, and caching, then the presentation layer displays the result. The graph preserves documented capabilities such as prefetching, animated images, Live Photos, and customizable image processing. Some subsystem links are supported only by the README or source-index references; unsampled implementation details are not inferred.
Main entry points: KingfisherManager.swift Image manager · ImageCache.swift Hybrid image cache · ImageView+Kingfisher.swift View extensions · Source.swift Image sources
Components 22
App interfaces
- View extensions
Sources/Extensions/ImageView+Kingfisher.swift - KF builder
Sources/General/KF.swift - SwiftUI image
Sources/SwiftUI/KFImage.swift
Image retrieval
- Image manager
Sources/General/KingfisherManager.swift - Image sources
Sources/General/ImageSource/Source.swift - Network resources
Sources/General/ImageSource/Resource.swift - Data providers
Sources/General/ImageSource/ImageDataProvider.swift - Image downloader
Sources/Networking/ImageDownloader.swift - Session task
Sources/Networking/SessionDataTask.swift - Image prefetcher
Sources/Networking/ImagePrefetcher.swift - Live Photo loading
Sources/General/KingfisherManager+LivePhoto.swift
Image and cache
- Image processors
Sources/Image/ImageProcessor.swift - Image formats
Sources/Image/ImageFormat.swift - Hybrid image cache
Sources/Cache/ImageCache.swift - Memory storage
Sources/Cache/MemoryStorage.swift - Disk storage
Sources/Cache/DiskStorage.swift - Cache serializer
Sources/Cache/CacheSerializer.swift
Image presentation
- SwiftUI binder
Sources/SwiftUI/ImageBinder.swift - Animated image view
Sources/Views/AnimatedImageView.swift - Image transitions
Sources/Image/ImageTransition.swift
Other components
- Host app
- URLSession network
Connections 23
- Host app → View extensions: sets image
README.md - Host app → SwiftUI image: declares image
README.md - View extensions → Image manager: requests image
Sources/Extensions/ImageView+Kingfisher.swift - KF builder → Image manager: configures loading
- SwiftUI image → SwiftUI binder: binds image
Sources/SwiftUI/ImageBinder.swift - SwiftUI binder → Image manager: requests image
Sources/SwiftUI/ImageBinder.swift - Image manager → Image sources: accepts source
Sources/General/KingfisherManager.swift - Image sources → Network resources: wraps resource
Sources/General/ImageSource/Source.swift - Image sources → Data providers: uses provider
Sources/General/ImageSource/Source.swift - Image manager → Image downloader: downloads image
Sources/General/KingfisherManager.swift - Image manager → Hybrid image cache: checks and stores
Sources/General/KingfisherManager.swift - Image manager → Image processors: processes image
Sources/General/KingfisherManager.swift - Image downloader → URLSession network: fetches data
README.md - Image downloader → Session task: manages task
- Image prefetcher → Hybrid image cache: warms cache
README.md - Hybrid image cache → Memory storage: uses memory
Sources/Cache/ImageCache.swift - Hybrid image cache → Disk storage: uses disk
Sources/Cache/ImageCache.swift - Hybrid image cache → Cache serializer: serializes entries
Sources/Cache/ImageCache.swift - Image processors → Image formats: handles formats
- View extensions → Image transitions: animates setting
README.md - Host app → Image prefetcher: prefetches images
README.md - Host app → Animated image view: shows animation
README.md - Host app → Live Photo loading: loads Live Photo
README.md