Page last updated 13 November 2024
An image type is a container of an image asset with an associated caption.
Properties
| Name | Type | Format | Description |
|---|---|---|---|
| asset | object | Asset | The asset that is linked to from the entry. |
| caption | string | The image caption, defined in the entry. |
Example
const entry = await client.entries.get({
id: "<entry-id>",
linkDepth: 1,
});
console.log(entry.thumbnailImage.asset.sys.uri);
console.log(entry.thumbnailImage.altText);
// A linkDepth of 1 is required to resolve the extended asset.sys fields
console.log(entry.thumbnailImage.asset.sys.properties.width);
console.log(entry.thumbnailImage.asset.sys.properties.height);