getImage
@spartanfx/react / spfx / getImage
Function: getImage()
function getImage(imageFieldValue, type): any;
Renders an image thumbnail or full image based on the type. Safely parses JSON if needed.
Parameters
imageFieldValue
any
The image field value from SharePoint.
type
"normal" | "thumb"
Type of image to return: 'thumb' or 'normal'.
Returns
any
The image URL string or null.
Example
Minimal usage
getImage(imageFieldValue, type)