dc-delivery-sdk-js
    Preparing search index...

    Class Image

    Class representing an Image resource with helper functions. Image URL helper functions will take into consideration staging and custom hostname overrides.

    Index

    Constructors

    Properties

    Metadata about the Media object

    defaultHost: string

    Default host name to use when constructing a URL to the resource. Your application may override this value with a branded host name in the SDK configuration.

    endpoint: string

    Name of the account to use when constructing a URL to the resource.

    id: string

    ID of the media object

    mimeType: string

    Mime type of the media object

    name: string

    Name of the media object to use when constructing a URL to the resource.

    Methods

    • Returns the hostname that should be used to load this media resource. The hostname will use the staging and media host overrides if specified otherwise it will use the defaultHost provided by the delivery API.

      Parameters

      • secure: boolean

      Returns string

    • Returns a builder which can be used to construct a URL to this image resource. You can apply transformations such as resize and image format using the returned builder.

      image.thumbnail().width(500).build();
      

      Returns ImageUrlBuilder