Skip to content

Commit

Permalink
Ignore compressing .gif
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse committed Sep 23, 2024
1 parent 86c65e6 commit 3786c91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/compress-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -111,6 +108,8 @@ const COMPRESS_CONFIG = {
case '.webp':
imageBuffer = await sharp(image).webp(COMPRESS_CONFIG.webp).toBuffer();
break;
case '.gif':
continue;
}

if (!imageBuffer) {
Expand Down

0 comments on commit 3786c91

Please sign in to comment.