diff --git a/blocks/card-list-block/features/card-list/default.jsx b/blocks/card-list-block/features/card-list/default.jsx index d2fec9bd79..cf9ce369d3 100644 --- a/blocks/card-list-block/features/card-list/default.jsx +++ b/blocks/card-list-block/features/card-list/default.jsx @@ -10,6 +10,7 @@ import { Date, formatAuthors, formatURL, + getFocalFromANS, getImageFromANS, Heading, HeadingSection, @@ -84,21 +85,29 @@ const CardListItems = (props) => { promo_items { basic { _id - type - url auth { ${RESIZER_TOKEN_VERSION} } + focal_point { + x + y + } + type + url } lead_art { promo_items { basic { _id - type - url auth { ${RESIZER_TOKEN_VERSION} } + focal_point { + x + y + } + type + url } } type @@ -170,7 +179,7 @@ const CardListItems = (props) => { ansImage, aspectRatio: "4:3", resizedOptions: { - smart: true, + ...getFocalFromANS(ansImage), }, responsiveImages: [377, 754, 1508], width: 377, @@ -230,7 +239,7 @@ const CardListItems = (props) => { ansImage: itemAnsImage, aspectRatio: "3:2", resizedOptions: { - smart: true, + ...getFocalFromANS(itemAnsImage), }, responsiveImages: [105, 210, 420], width: 105, diff --git a/blocks/extra-large-promo-block/features/extra-large-promo/default.jsx b/blocks/extra-large-promo-block/features/extra-large-promo/default.jsx index 8ebbf62e17..6d115cc0a0 100644 --- a/blocks/extra-large-promo-block/features/extra-large-promo/default.jsx +++ b/blocks/extra-large-promo-block/features/extra-large-promo/default.jsx @@ -11,6 +11,7 @@ import { Conditional, Date as DateComponent, formatAuthors, + getFocalFromANS, getImageFromANS, getVideoFromANS, Heading, @@ -211,21 +212,29 @@ const ExtraLargePromo = ({ customFields }) => { promo_items { basic { _id - type - url auth { ${RESIZER_TOKEN_VERSION} } + focal_point { + x + y + } + type + url } } } basic { _id - type - url auth { ${RESIZER_TOKEN_VERSION} } + focal_point { + x + y + } + type + url } } website_url @@ -296,21 +305,22 @@ const ExtraLargePromo = ({ customFields }) => { showByline && content?.credits?.by?.length > 0 ? formatAuthors(content.credits.by, phrases.t("global.and-text")) : null; + const ansImage = getImageFromANS(content); const imageParams = showImage && - (imageOverrideURL || (content && getImageFromANS(content)) + (imageOverrideURL || ansImage ? { ansImage: imageOverrideURL ? { - _id: resizedImage ? imageOverrideId : "", - url: imageOverrideURL, - auth: resizedAuth || {}, - } - : getImageFromANS(content), + _id: resizedImage ? imageOverrideId : "", + url: imageOverrideURL, + auth: resizedAuth || {}, + } + : ansImage, alt: content?.headlines?.basic || "", aspectRatio: imageRatio, resizedOptions: { - smart: true, + ...getFocalFromANS(ansImage), }, responsiveImages: [400, 600, 800, 1200], width: 800, diff --git a/blocks/large-promo-block/features/large-promo/default.jsx b/blocks/large-promo-block/features/large-promo/default.jsx index af4a0b5b08..80f557a635 100644 --- a/blocks/large-promo-block/features/large-promo/default.jsx +++ b/blocks/large-promo-block/features/large-promo/default.jsx @@ -18,6 +18,7 @@ import { MediaItem, Stack, formatURL, + getFocalFromANS, getImageFromANS, getVideoFromANS, isServerSide, @@ -221,21 +222,29 @@ const LargePromoItem = ({ customFields, arcSite }) => { promo_items { basic { _id - type - url auth { ${RESIZER_TOKEN_VERSION} } + focal_point { + x + y + } + type + url } } } basic { _id - type - url auth { ${RESIZER_TOKEN_VERSION} } + focal_point { + x + y + } + type + url } } embed_html @@ -337,9 +346,10 @@ const LargePromoItem = ({ customFields, arcSite }) => { const contentOverline = showOverline ? overlineText : null; const contentUrl = content?.websites?.[arcSite]?.website_url; const embedMarkup = playVideoInPlace && getVideoFromANS(content); - const promoImageParams = + const ansImage = getImageFromANS(content); + const promoImageParams = showImage && - (imageOverrideURL || (content && getImageFromANS(content)) + (imageOverrideURL || ansImage ? { ansImage: imageOverrideURL ? { @@ -347,11 +357,11 @@ const LargePromoItem = ({ customFields, arcSite }) => { url: imageOverrideURL, auth: resizedAuth || {}, } - : getImageFromANS(content), + : ansImage, alt: content?.headlines?.basic || "", aspectRatio: imageRatio, resizedOptions: { - smart: true, + ...getFocalFromANS(ansImage), }, responsiveImages: [400, 600, 800, 1200], width: 377, diff --git a/blocks/lead-art-block/features/leadart/default.jsx b/blocks/lead-art-block/features/leadart/default.jsx index c59397c39a..0cd5136a9d 100644 --- a/blocks/lead-art-block/features/leadart/default.jsx +++ b/blocks/lead-art-block/features/leadart/default.jsx @@ -9,6 +9,7 @@ import { Carousel, formatCredits, formatPowaVideoEmbed, + getFocalFromANS, Icon, Image, MediaItem, @@ -140,12 +141,12 @@ export const LeadArtPresentation = (props) => {
{leadArt.alt_text} {isOpen ? (