ImageOption

public enum ImageOption : Equatable, Hashable

An enum-based API for specifying retrieval and server-side manipulation of images referenced by Contentful assets. See Images API Reference

  • Specify the height of the image in pixels to be returned from the API. Valid ranges for height are between 0 and 4000.

    Declaration

    Swift

    case height(UInt)
  • Specify the width of the image in pixels to be returned from the API. Valid ranges for width are between 0 and 4000.

    Declaration

    Swift

    case width(UInt)
  • Specify the desired image filetype extension to be returned from the API.

    Declaration

    Swift

    case formatAs(Format)
  • Specify options for resizing behavior including . See Fit for available options.

    Declaration

    Swift

    case fit(for: Fit)
  • Specify the radius for rounded corners for an image.

    Declaration

    Swift

    case withCornerRadius(Float)