Skip to content

Commit

Permalink
Merge pull request #412 from ourzora/replace-zora-renderer
Browse files Browse the repository at this point in the history
Fix issues with single images
  • Loading branch information
neokry authored Nov 24, 2023
2 parents 7f7dd49 + ae889ae commit ce00936
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/web/src/pages/api/renderer/stack-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
// Handle single image
if (typeof images === 'string') {
const data = await getImageData(images)
const convertedImage = await sharp(data).webp({ quality: 100 }).toBuffer()

res.setHeader(
'Cache-Control',
`public, s-maxage=${maxAge}, stale-while-revalidate=${swr}`
)
res.setHeader('Content-Type', 'image/webp')
return res.send(data)
return res.send(convertedImage)
}

// Handle multiple images
Expand Down

2 comments on commit ce00936

@vercel
Copy link

@vercel vercel bot commented on ce00936 Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

testnet-nouns-builder – ./apps/web

testnet-nouns-builder-nouns-builder.vercel.app
testnet-nouns-builder-git-main-nouns-builder.vercel.app
testnet.nouns.build

@vercel
Copy link

@vercel vercel bot commented on ce00936 Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.