From 3bac7d6b026b0763f3f200dc570de7d9249eefe7 Mon Sep 17 00:00:00 2001 From: trevor-signal <131492920+trevor-signal@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:42:43 -0400 Subject: [PATCH] Properly calculate thumbnail size --- ts/types/Attachment.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/types/Attachment.ts b/ts/types/Attachment.ts index d3804958d6..99cccc31be 100644 --- a/ts/types/Attachment.ts +++ b/ts/types/Attachment.ts @@ -453,7 +453,7 @@ export async function captureDimensionsAndScreenshot( contentType: THUMBNAIL_CONTENT_TYPE, width: THUMBNAIL_SIZE, height: THUMBNAIL_SIZE, - size: 100, + size: thumbnailBuffer.byteLength, }, }; } catch (error) { @@ -513,7 +513,7 @@ export async function captureDimensionsAndScreenshot( contentType: THUMBNAIL_CONTENT_TYPE, width: THUMBNAIL_SIZE, height: THUMBNAIL_SIZE, - size: 100, + size: thumbnailBuffer.byteLength, }, width, height,