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).
Useful Links
Required properties
- url or contentUrl
string
The image file URL. Relative URLs become absolute.
Google image metadata
Google's image metadata feature requires contentUrl. Google also accepts url in its place. Unhead copies url to contentUrl when contentUrl is empty.
You must also add at least one of these properties:
creatorcreditTextcopyrightNoticelicense
Google recommends the other three properties and 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:
inLanguagefrom resolved page metadata - contentUrl:
url
Resolves
See Global Resolves for full context.
creatorresolves as a Person or OrganizationlicenseandacquireLicensePagebecome absolute URLswidthandheightmust 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
HowTo Schema - JSON-LD Guide & Examples
Add HowTo structured data with Unhead, including step-by-step JSON-LD, images, supplies, tools, and time estimates.
ItemList Schema - JSON-LD Guide & Examples
Add ItemList structured data with Unhead. Create ordered lists and eligible Google carousels for courses, movies, recipes, and restaurants.