ImageInfo

public struct ImageInfo : Hashable, Sendable

Image info model.

Properties

  • Declaration

    Swift

    public let imageKey: String
  • Declaration

    Swift

    public let sizes: [Int?]
  • Declaration

    Swift

    public var baseUrl: String { get }
  • Declaration

    Swift

    public var fileExtension: String { get }

Methods

  • Declaration

    Swift

    public static func url(
        baseUrl: String,
        imageKey: String,
        fileExtension: String,
        size: Int?
    ) -> String
  • Gets the image URL for the specific image size. If the specific size is not found it gets the URL for the closest size. Requires nil for the original size.

    Declaration

    Swift

    public func url(size: Int?) -> String

Equatable

  • Declaration

    Swift

    public static func == (lhs: ImageInfo, rhs: ImageInfo) -> Bool

Hashable

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)