Cloud Image field

The cloudImage field is used to work in conjunction with Keystatic Cloud's Image Library.

Instead of storing the image itself, the field stores a reference to the image in the cloud.

Screenshot of the Cloud Image field modal UI

Returned value

The returned value for this field is an object with the following properties:

  • src: the URL of the image
  • alt: the default alt text as set in the Image Library
  • height: the height of the image
  • width: the width of the image

Example usage

avatar: fields.cloudImage({
  label: 'Avatar',
  description: 'The avatar for this user',
  validation: {
    isRequired: true
  }
})

Type signature

Find the latest version of this field's type signature at: https://docsmill.dev/npm/@keystatic/core@latest#/.fields.cloudImage