Skip to content

Commit

Permalink
Change the url variable if matches
Browse files Browse the repository at this point in the history
  • Loading branch information
barryf committed Nov 24, 2024
1 parent 2669529 commit a17eb37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/events/process-post/syndicate/bluesky.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a17eb37

Please sign in to comment.