fix: listen to imagevault width if no width is given in cs

This commit is contained in:
Christel Westerberg
2024-08-22 13:18:48 +02:00
parent 8b68b045eb
commit 58170c353c

View File

@@ -347,7 +347,9 @@ export const renderOptions: RenderOptions = {
const image = insertResponseToImageVaultAsset(attrs)
const alt = image.meta.alt ?? image.title
const width = parseInt(attrs.width.replaceAll("px", ""))
const width = attrs.width
? parseInt(attrs.width.replaceAll("px", ""))
: image.dimensions.width
const props = extractPossibleAttributes(attrs)
return (
<section key={node.uid}>