Hi everyone ![]()
I just released Pickel 1.0, a lightweight image loading library for SwiftUI and UIKit. I’d love feedback from people who’ve used or built image loaders.
Why another image loader?
I wanted something small that was written from the start for async/await and Swift 6 strict concurrency, instead of having concurrency added later. Pickel compiles in Swift 6 language mode, has zero data-race safety errors on the Swift Package Index and has no dependencies.
What it does
- Memory and disk caching (each image downloads once; requests for the same URL share one download)
- Downsampling to the size the image is shown at, so large photos don’t take up a lot of memory
- Processors: resize, rounded corners, circle
- Prefetching for lists and grids
- Basic safety: only
http/https/fileURLs, a 50 MB limit per response, and a 24-megapixel limit when decoding - iOS 17+, macOS 14+, tvOS 17+, visionOS 1+
SwiftUI
PickelImage(url: url) { image in
image.resizable().scaledToFill()
} placeholder: {
ProgressView()
} failure: {
Image(systemName: "photo")
}
UIKit (old loads are cancelled when cells are reused)
imageView.pickel.setImage(with: url, placeholder: UIImage(named: "placeholder"))
async/await
let image = try await ImagePipeline.shared.image(for: url)
Links
- GitHub: GitHub - himanshu240601/Pickel: A modern, concurrency-aware image loading library for iOS. · GitHub
- Docs: Pickel Documentation
- There’s also a demo app in
Examples/PickelDemo(gallery, avatars, UIKit collection view, processors)
Feedback I’m looking for
- What does the API get wrong or leave out compared with what you use today?
- Which features would you need before using it in a real app? (Animated GIF/WebP and an
NSImageViewextension are what I’m considering next.) - Anything about how the pipeline handles concurrency that looks wrong to you
Thanks for taking a look!
