Replies: 1 comment
-
Hey, I was just looking into these APIs yesterday. Yes, there is a way to fetch the original thumbnails using ImageRequest.ThumbnailOptions. It would look something like this: // Code wasn't tested
func test() async throws {
let url = URL(fileURLWithPath: "...")
let thumbnail = try await ImagePipeline.shared.image(for: ImageRequest(url: url, userInfo: [
.thumbnailKey: {
var options = ImageRequest.ThumbnailOptions(maxPixelSize: 1200)
options.createThumbnailFromImageAlways = false
return options
}()
]))
let image = try await ImagePipeline.shared.image(for: url)
} I'm not sure why I decided to go with Please, be aware that there is a known issue with combining thumbnail and non-thumbnail requests #705 and it's addressed in the upcoming Nuke 12.6. As for the local files, yes, the framework fully supports loading images from local files, but the requests will go through |
Beta Was this translation helpful? Give feedback.
-
I have a use case for using Nuke's
LazyImage
to show hundreds, or even thousands, of local images. I have this working locally but it has to read the whole image before displaying. These local images are 20-80mp in size, and most have embedded thumbnails.Is there a way to modify the loading process to quickly load thumbnails first, then return the image when its fully loaded?
Beta Was this translation helpful? Give feedback.
All reactions