Skip to main content

An image type is a container of an image asset with an associated caption.

Properties

NameTypeFormatDescription
assetobjectAssetThe asset that is linked to from the entry.
captionstringThe image caption, defined in the entry.

Example

Get an entry resolving all fields to a link depth of 1 and output properties of the resolved 'thumbnailImage' field

TypeScript
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);

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request