how to get the url of image where image is stored? #1924
Replies: 3 comments
-
Maybe this and you can use it like: let url = ImageLoader.sampleImageURLs[indexPath.row]
let fileURL = KingfisherManager.shared.cache.diskStorage.cacheFileURL(forKey: url.cacheKey) But be careful, it just gives you a URL where the image "should" be in if it was cached. Remember to check the file existence every time before you actually use that URL to do your things. |
Beta Was this translation helpful? Give feedback.
-
You can retrieve the cached image URL from Kingfisher by using the |
Beta Was this translation helpful? Give feedback.
-
If your image is cached by Kingfisher, you typically won’t be able to directly access the URL of the cached image, as caching mechanisms often keep the file URL within the app or service. However, if you're looking to retrieve the image’s source URL, here’s a general approach:
If you’re looking for an image related to dental care, for example, I’ve found that a custom night guard image URL might be cached as well if used frequently in the app or site. |
Beta Was this translation helpful? Give feedback.
-
my image is set into cache by kingfisher I need the URL where this image is stored how to know that?
like FileURL?
thanks
Beta Was this translation helpful? Give feedback.
All reactions