import sharp from 'sharp' export default async function handler(req, res) { const roundedCorners = Buffer.from( '' ) const buffer = await sharp(roundedCorners).resize(200, 200).png().toBuffer() res.setHeader('content-type', 'image/png') res.setHeader('content-length', buffer.byteLength) res.end(buffer) }