We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf16e8d commit 81a8838Copy full SHA for 81a8838
packages/endpoint-media/lib/media-transform.js
@@ -7,6 +7,11 @@ import sharp from "sharp";
7
* @returns {Promise<object>} Media file
8
*/
9
export const mediaTransform = async (imageProcessing, file) => {
10
+ // Function currently only supports transforming images
11
+ if (!file.mimetype.includes("image/")) {
12
+ return file;
13
+ }
14
+
15
const { resize } = imageProcessing;
16
17
file.data = await sharp(file.data).rotate().resize(resize).toBuffer();
0 commit comments