• Creates a valid ImageMetadata.

    Parameters

    • input: ImageOptions

      Use your IDE suggestions for an enhanced development experience

    Returns ImageMetadata

    Example

    Single image:

    const metadata = image({
    title: 'Touch grass',
    image: {
    item: 'https://example.com/image.png',
    type: MediaImageMimeType.PNG,
    altTag: 'Me touching grass',
    license: MetadataLicenseType.CCO,
    },
    });

    Example

    A gallery:

    const metadata = image({
    title: 'Touch grass',
    image: {
    item: 'https://example.com/cover.png',
    type: MediaImageMimeType.PNG,
    altTag: 'A collage of me touching grass',
    license: MetadataLicenseType.CCO,
    },
    attachments: [
    {
    item: 'https://example.com/image-1.png',
    type: MediaImageMimeType.PNG,
    license: MetadataLicenseType.CC_BY_NC,
    altTag: 'Me touching a tree',
    },
    {
    item: 'https://example.com/image-2.png',
    type: MediaImageMimeType.PNG,
    license: MetadataLicenseType.CC_BY_NC,
    altTag: 'The tree touching me',
    },
    ],
    });