From f47a8d0791c4daa9bf646d9ab055911f2463afa6 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Sun, 24 Nov 2024 17:41:20 -0300 Subject: [PATCH] Use a scale in Image and Teaser blocks for now --- packages/blocks/Image/index.tsx | 2 +- packages/blocks/Teaser/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/blocks/Image/index.tsx b/packages/blocks/Image/index.tsx index 3afdcc6e65..844b113fe1 100644 --- a/packages/blocks/Image/index.tsx +++ b/packages/blocks/Image/index.tsx @@ -7,7 +7,7 @@ const ImageBlockView = (props: BlockViewProps) => { const { data } = props; if (!data.url) return null; const url = data.image_scales - ? `/++api++${flattenToAppURL(data.url)}/${data.image_scales[data.image_field][0].download}` + ? `/++api++${flattenToAppURL(data.url)}/${data.image_scales[data.image_field][0].scales.larger.download}` : data.url; // data.preview_image?.[0]?.['@id'] || // `/++api++${data.href[0]?.image_scales[data.href[0].image_field][0].base_path}/${data.href[0]?.image_scales[data.href[0].image_field][0].download}`; diff --git a/packages/blocks/Teaser/index.tsx b/packages/blocks/Teaser/index.tsx index 88a8218193..03b8b07ffe 100644 --- a/packages/blocks/Teaser/index.tsx +++ b/packages/blocks/Teaser/index.tsx @@ -9,7 +9,7 @@ const TeaserBlockView = (props: BlockViewProps) => { // for @@images and @@download const url = data.preview_image?.[0]?.['@id'] || - `/++api++${data.href[0]?.image_scales[data.href[0].image_field][0].base_path}/${data.href[0]?.image_scales[data.href[0].image_field][0].download}`; + `/++api++${data.href[0]?.image_scales[data.href[0].image_field][0].base_path}/${data.href[0]?.image_scales[data.href[0].image_field][0].scales.larger.download}`; return (