Schema
Image Schema
Schema.org Image
- Type:
defineImage(input?: Image)
Describes an individual image (usually in the context of an embedded media object).
Useful Links
Required properties
- url
string
The URL of the image file (e.g., /images/cat.jpg).
Defaults
- @type:
ImageObject - @id:
${canonicalUrl}#/schema/image/${hash(image.url)} - inLanguage:
options.defaultLanguage(only when caption is provided) (see: user Config) - contentUrl: is set to
url
Resolves
See Global Resolves for full context.
widthandheightmust be provided for either to be included
Examples
Minimal
defineImage({
url: '/cat.jpg',
})
Types
export interface ImageSimple extends Thing {
/**
* The URL of the image file (e.g., /images/cat.jpg).
*/
url: string
/**
* The fully-qualified, absolute URL of the image file (e.g., https://www.example.com/images/cat.jpg).
* Note: The contentUrl and url properties are intentionally duplicated.
*/
contentUrl?: string
/**
* A text string describing the image.
* - Fall back to the image alt attribute if no specific caption field exists or is defined.
*/
caption?: string
/**
* The height of the image in pixels.
* - Must be used with width.
*/
height?: number
/**
* The width of the image in pixels.
* - Must be used with height.
*/
width?: number
/**
* The language code for the textual content; e.g., en-GB.
* - Only needed when providing a caption.
*/
inLanguage?: string
/**
* The name of the image.
*/
name?: string
/**
* A description of the image.
*/
description?: string
/**
* The file format or media type of the image (e.g., image/jpeg).
*/
encodingFormat?: string
}
Did this page help you?
HowTo Schema
Use defineHowTo() to add HowTo structured data. Enable step-by-step rich snippets with images and time estimates in Google search results.
ItemList Schema
Use defineItemList() to add ItemList structured data. Create carousels and ordered lists for products, articles, and other content in search.