We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b8b633 commit fda65b8Copy full SHA for fda65b8
src/lib/templates/imageFunction.js
@@ -3,6 +3,7 @@ const sharp = require('sharp')
3
const fetch = require('node-fetch')
4
const imageType = require('image-type')
5
const isSvg = require('is-svg')
6
+const etag = require('etag')
7
8
// 6MB is hard max Lambda response size
9
const MAX_RESPONSE_SIZE = 6291456
@@ -116,6 +117,7 @@ const handler = async (event) => {
116
117
statusCode: 200,
118
headers: {
119
'Content-Type': `image/${info.format}`,
120
+ etag: etag(imageBuffer),
121
},
122
body: imageBuffer.toString('base64'),
123
isBase64Encoded: true,
0 commit comments