Remove square enforcing in resizeBase64Image (#25389)

This commit is contained in:
sean-brydon authored and GitHub committed 2025-11-25 16:15:57 +05:30
1 parent d03f45dd0f
commit ef3281f06f
1 file changed
-4
-4
View File
@@ -26,10 +26,6 @@ export async function resizeBase64Image(
maxSize = 96 * 4,
} = opts ?? {};
const image = await jimp.read(buffer);
if (image.getHeight() !== image.getWidth()) {
// this could be handled later
throw new Error("Image is not a square");
}
const currentSize = Math.max(image.getWidth(), image.getHeight());
if (currentSize > maxSize) {
image.resize(jimp.AUTO, maxSize);