OGImage

public final class OGImage: NSObject, Codable

Represents OpenGraph Image information

Since

3.0.193
  • url

    Optional an image url

    Declaration

    Swift

    public let url: String?
  • Optional an alternate url to use if the webpage requires HTTPS

    Declaration

    Swift

    public let secureURL: String?
  • Optional a MIME type for this image

    Declaration

    Swift

    public let type: String?
  • alt

    Optional description of what is in the image (not a caption). If the page specifies an og:image it should specify this property

    Declaration

    Swift

    public let alt: String?
  • Optional number of pixels wide, 0 if not provided

    Declaration

    Swift

    public let width: Int
  • Optional number of pixels high, 0 if not provided

    Declaration

    Swift

    public let height: Int
  • Declaration

    Swift

    public required init(from decoder: Decoder) throws