dmytro-anokhin / url-image

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3.0 Identifier

jessegrosjean opened this issue · comments

In update notes it says "Custom identifier can still be passed as an argument of URLImage", but the only constructor where I see that used is make private... is that an over-site?

My use case is that I have the same imageURL but in different parts of my UI I want to view it at different sizes. I'm using

.environment(\.urlImageOptions, URLImageOptions(
  maxPixelSize: CGSize(width: size, height: size)
))

But it seems that without a custom identifier get the cached version of the first loaded size always.

Hey,

thanks for reporting issue with identifier, it indeed must be public. Fix is in 3.0.1.

For you use case, you can configure different in memory store for different parts of the app. File store saves original image; in memory store - decoded up to the size you provide.