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