An image object in any shape Sanity TypeGen generates for it: a raw image
field, an image with asset-> dereferenced, or a partial projection such as
image{asset, crop, hotspot}. Custom image types with extra fields (alt,
caption, ...) and any _type are accepted.
asset is optional and nullable, matching TypeGen, since an image field can
exist before an asset has been uploaded to it. Use isImageWithAsset
to narrow a value to one that has an asset.
An image object in any shape Sanity TypeGen generates for it: a raw image field, an image with
asset->dereferenced, or a partial projection such asimage{asset, crop, hotspot}. Custom image types with extra fields (alt,caption, ...) and any_typeare accepted.assetis optional and nullable, matching TypeGen, since an image field can exist before an asset has been uploaded to it. Use isImageWithAsset to narrow a value to one that has an asset.