From 65873cfe69eb2c1aa4aabbe3746b1ee0499f5b44 Mon Sep 17 00:00:00 2001 From: Ike Saunders Date: Fri, 6 Sep 2024 15:37:19 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20PNG=20assumption=20in=20At?= =?UTF-8?q?omArticleBlocks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/gdocs/components/AtomArticleBlocks.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/site/gdocs/components/AtomArticleBlocks.tsx b/site/gdocs/components/AtomArticleBlocks.tsx index 9e6d5bd98e6..8fb795d7d8b 100644 --- a/site/gdocs/components/AtomArticleBlocks.tsx +++ b/site/gdocs/components/AtomArticleBlocks.tsx @@ -94,7 +94,10 @@ function Image({ ? Math.round(LARGEST_IMAGE_WIDTH / aspectRatio) : undefined - const extension = getFilenameExtension(image.filename) + // If we're using a resized image (i.e. it has a width suffix), the file extension is ALWAYS png + // If we're using the original image, we need to check the original file extension (which SHOULD be png, but might not be) + const extension = widthSuffix ? "png" : getFilenameExtension(filename) + return (