From 3786c91d7144a17184769da269dbe4a93f2395b8 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Mon, 23 Sep 2024 22:41:55 +0100 Subject: [PATCH] Ignore compressing .gif --- scripts/compress-images.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/compress-images.ts b/scripts/compress-images.ts index 1db8f5f86..a155735eb 100644 --- a/scripts/compress-images.ts +++ b/scripts/compress-images.ts @@ -90,9 +90,6 @@ const COMPRESS_CONFIG = { case '.avif': imageBuffer = await sharp(image).avif(COMPRESS_CONFIG.avif).toBuffer(); break; - case '.gif': - imageBuffer = await sharp(image).gif(COMPRESS_CONFIG.gif).toBuffer(); - break; case '.heif': imageBuffer = await sharp(image).heif().toBuffer(); break; @@ -111,6 +108,8 @@ const COMPRESS_CONFIG = { case '.webp': imageBuffer = await sharp(image).webp(COMPRESS_CONFIG.webp).toBuffer(); break; + case '.gif': + continue; } if (!imageBuffer) {