Index of every page on this site: llms.txt
TypeScript
Schema

Image Schema

Schema.org Image

  • Type: defineImage<T extends Record<string, any>>(input?: ImageObject & T)

Describes an individual image (usually in the context of an embedded media object).

Required properties

  • url or contentUrl string
    The image file URL. Relative URLs become absolute.

Google image metadata

For licensable images, add creator, creditText, copyrightNotice, and at least one of license or acquireLicensePage. Unhead resolves a nested creator as a Person or Organization and makes license URLs absolute.

Defaults

  • @type: ImageObject
  • @id: ${canonicalHost}#/schema/image/{n}
  • inLanguage: inLanguage from resolved page metadata
  • contentUrl: url

Resolves

See Global Resolves for full context.

  • creator resolves as a Person or Organization
  • license and acquireLicensePage become absolute URLs
  • width and height must be provided for either to be included

Examples

Minimal

defineImage({
  url: '/cat.jpg',
})

Types

interface ImageBase extends Thing {
  caption?: string
  height?: number
  width?: number
  inLanguage?: string
  name?: string
  description?: string
  encodingFormat?: string
  creator?: NodeRelations<Identity>
  creditText?: string
  copyrightNotice?: string
  license?: string
  acquireLicensePage?: string
}

type ImageLocation
  = | { url: string, contentUrl?: string }
    | { url?: string, contentUrl: string }

export type ImageSimple = ImageBase & ImageLocation
Did this page help you?