Skip to content

Commit

Permalink
Use a scale in Image and Teaser blocks for now
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Nov 24, 2024
1 parent 83b1246 commit f47a8d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/blocks/Image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/Teaser/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div>
Expand Down

0 comments on commit f47a8d0

Please sign in to comment.