An image loading and caching framework for SwiftUI using Combine.
This framework respects ImagePipeline, but cutting off image process feature.
By using RemoteImage confirming to SwiftUI.View, fetch image with URL and cache on memory.
var body: some View {
RemoteImage(url: url, defaultImage: defaultImage)
}
let pipeline = ImagePipeline()
pipeline.load(url)
.sink { (completion) in
} receiveValue: { (image) in
}
}
.store(in: &cancellables)
✅ PNG
✅ JPEG
✅ GIF
✅ WebP
- macOS v10.15 and later
- iOS v13.0 and later
- tvOS v13.0 and later
Note: watchOS is not supported now since SnapshotTesting is not supported for watchOS.
- Disk Caching
- Image Processing
Only support via Swift package manager installation.
dependencies: [
.package(url: "https://github.com/d-date/ImagePipelineCombine.git", from: "0.1.0")
]