⚡ Remove excessive logging
This commit is contained in:
parent
b4fb95ffe6
commit
5357fbb572
|
@ -34,16 +34,11 @@ async function compressImages(inputDir, outputDir) {
|
||||||
try {
|
try {
|
||||||
// Check if the output WebP file already exists
|
// Check if the output WebP file already exists
|
||||||
await fs.access(outputWebpPath);
|
await fs.access(outputWebpPath);
|
||||||
|
|
||||||
// File exists, so skip compression
|
|
||||||
console.log(`Skipped: ${inputFilePath}`);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// File doesn't exist, proceed with compression
|
// File doesn't exist, proceed with compression
|
||||||
await sharp(inputFilePath)
|
await sharp(inputFilePath)
|
||||||
.webp({ quality: 75 })
|
.webp({ quality: 75 })
|
||||||
.toFile(outputWebpPath);
|
.toFile(outputWebpPath);
|
||||||
|
|
||||||
console.log(`Compressed: ${inputFilePath}`);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue