From 58170c353c21da0ffee5b932e0fd44177fc0040b Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Thu, 22 Aug 2024 13:18:48 +0200 Subject: [PATCH] fix: listen to imagevault width if no width is given in cs --- components/JsonToHtml/renderOptions.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/JsonToHtml/renderOptions.tsx b/components/JsonToHtml/renderOptions.tsx index 40122a9a8..7ebf1874e 100644 --- a/components/JsonToHtml/renderOptions.tsx +++ b/components/JsonToHtml/renderOptions.tsx @@ -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 (