The WP Media fields.

MediaType

interface MediaType {
    acf: object[];
    alt_text: string;
    author: number;
    caption: {
        rendered: string;
    };
    date: string;
    id: number;
    link: string;
    media_details: {
        file: string;
        filesize: number;
        height: number;
        image_meta: {
            aperture: string;
            camera: string;
            caption: string;
            copyright: string;
            created_timestamp: string;
            credit: string;
            focal_length: string;
            iso: string;
            keywords: string[];
            orientation: string;
            shutter_speed: string;
            title: string;
        };
        sizes: {
            [key: string]: {
                file: string;
                height: number;
                mime_type: string;
                source_url: string;
                width: number;
            };
        };
        width: number;
    };
    media_type: string;
    mime_type: string;
    slug: string;
    source_url: string;
    title: {
        rendered: string;
    };
    type: string;
}

Hierarchy (view full)

Properties

acf: object[]

The ACF fields. Expose fields to use custom media information in your JS app.

alt_text: string

The alternative text.

author: number

The author ID.

caption: {
    rendered: string;
}

The caption.

Type declaration

  • rendered: string

    The rendered caption.

date: string

The date.

id: number

The id.

link: string

The link.

media_details: {
    file: string;
    filesize: number;
    height: number;
    image_meta: {
        aperture: string;
        camera: string;
        caption: string;
        copyright: string;
        created_timestamp: string;
        credit: string;
        focal_length: string;
        iso: string;
        keywords: string[];
        orientation: string;
        shutter_speed: string;
        title: string;
    };
    sizes: {
        [key: string]: {
            file: string;
            height: number;
            mime_type: string;
            source_url: string;
            width: number;
        };
    };
    width: number;
}

The media details.

Type declaration

  • file: string

    The file.

  • filesize: number

    The filesize.

  • height: number

    The height.

  • image_meta: {
        aperture: string;
        camera: string;
        caption: string;
        copyright: string;
        created_timestamp: string;
        credit: string;
        focal_length: string;
        iso: string;
        keywords: string[];
        orientation: string;
        shutter_speed: string;
        title: string;
    }

    The image meta.

    Since

    3.0.0

    • aperture: string

      The aperture.

      Since

      3.0.0

    • camera: string

      The camera.

      Since

      3.0.0

    • caption: string

      The caption.

      Since

      3.0.0

    • copyright: string

      The copyright.

      Since

      3.0.0

    • created_timestamp: string

      The created timestamp.

      Since

      3.0.0

    • credit: string

      The credit.

      Since

      3.0.0

    • focal_length: string

      The focal length.

      Since

      3.0.0

    • iso: string

      The iso.

      Since

      3.0.0

    • keywords: string[]

      The keywords.

      Since

      3.0.0

    • orientation: string

      The orientation.

      Since

      3.0.0

    • shutter_speed: string

      The shutter speed.

      Since

      3.0.0

    • title: string

      The title.

      Since

      3.0.0

  • sizes: {
        [key: string]: {
            file: string;
            height: number;
            mime_type: string;
            source_url: string;
            width: number;
        };
    }

    The sizes.

    Since

    3.0.0

    • [key: string]: {
          file: string;
          height: number;
          mime_type: string;
          source_url: string;
          width: number;
      }

      The thumbnailsize.

      Since

      3.0.0

      • file: string

        The file.

        Since

        3.0.0

      • height: number

        The height.

        Since

        3.0.0

      • mime_type: string

        The mime type.

        Since

        3.0.0

      • source_url: string

        The source URL.

        Since

        3.0.0

      • width: number

        The width.

        Since

        3.0.0

  • width: number

    The width.

media_type: string

The media type.

mime_type: string

The mime type.

slug: string

The slug.

source_url: string

The source URL.

title: {
    rendered: string;
}

The title.

Type declaration

  • rendered: string

    The rendered title.

type: string

The type.

Generated using TypeDoc