From a17eb379523e79dfb485b37afd2ea15d28aab0f7 Mon Sep 17 00:00:00 2001 From: Barry Frost Date: Sun, 24 Nov 2024 18:02:13 +0000 Subject: [PATCH] Change the url variable if matches --- src/events/process-post/syndicate/bluesky.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/process-post/syndicate/bluesky.js b/src/events/process-post/syndicate/bluesky.js index 38cefb2..3fecd7a 100644 --- a/src/events/process-post/syndicate/bluesky.js +++ b/src/events/process-post/syndicate/bluesky.js @@ -21,10 +21,10 @@ async function syndicate (post) { if ('photo' in post.properties) { const photos = post.properties.photo.slice(0, 4) // max 4 for (const photo of photos) { - const url = (typeof photo === 'string') ? photo : photo.value + let url = (typeof photo === 'string') ? photo : photo.value const starts = 'https://res.cloudinary.com/barryf/image/upload/' if (url.startsWith(starts)) { - url.replace(starts, `${starts}h_768/`) + url = url.replace(starts, `${starts}h_768/`) } const alt = (typeof photo === 'string') ? '' : photo.alt const response = await fetch(url)