Replies: 1 comment
-
ImagePrefetcher(urls: urls) { skippedResources, failedResources, completedResources in
let smallImagesInMemoryCache = (skippedResources + completedResources).compactMap { r in
ImageCache.default.retrieveImageInMemoryCache(forKey: r.cacheKey)
}.filter { image in
image.size.width < 100 && image.size.height < 100
}
} However, be caution that if you have lots of images, it might be possible that the downloaded images are removed from the memory cache but only stored in the disk cache. In this situation, you have to also use the disk cache related method to check them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I extract image urls from html and use
ImagePrefetcher
to download the images. What would be the best way to filter out images smaller than say 100x100px?Beta Was this translation helpful? Give feedback.
All reactions