ImageResource

public struct ImageResource : Resource

ImageResource is a simple combination of downloadURL and cacheKey. When passed to image view set methods, Kingfisher will try to download the target image from the downloadURL, and then store it with the cacheKey as the key in cache.

Initializers

  • Creates an image resource.

    Declaration

    Swift

    public init(downloadURL: URL, cacheKey: String? = nil)

    Parameters

    downloadURL

    The target image URL from where the image can be downloaded.

    cacheKey

    The cache key. If nil, Kingfisher will use the absoluteString of downloadURL as the key. Default is nil.

Protocol Conforming