ImagePreview
ImagePreview(
props):Element
Defined in: packages/ui/src/components/image-preview.tsx:23
Displays an image from @cfast/storage or a direct URL.
Resolves the display URL from either a direct src, or a fileKey + getUrl
resolver function (for signed URL generation). Shows a placeholder when no
image is available, or renders the fallback element if provided.
Parameters
Section titled “Parameters”See ImagePreviewProps.
Returns
Section titled “Returns”Element
Example
Section titled “Example”<ImagePreview fileKey={post.coverImageKey} getUrl={(key) => storage.getSignedUrl(key)} width={200} height={150} fallback={<PlaceholderImage />}/>