feat: convert all to jpg
This commit is contained in:
@ -43,10 +43,7 @@ for (const obj of objects) {
|
||||
|
||||
// Use Jimp to compress and convert the PNG to JPG
|
||||
const image = await Jimp.read(`http://s3-api.app.max-richter.dev/silvester23/${pngFilePath}`);
|
||||
// const image = await sharp(pngBuffer)
|
||||
// .jpeg({ mozjpeg: true })
|
||||
// .toBuffer()
|
||||
const jpgBuffer = await image.quality(80).getBufferAsync(Jimp.MIME_JPEG);
|
||||
const jpgBuffer = await image.quality(80).getBufferAsync(Jimp.MIME_JPEG);
|
||||
|
||||
// Upload the JPG buffer back to the same MinIO bucket
|
||||
await minioClient.putObject(minioBucketName, jpgFilePath, jpgBuffer, {
|
||||
|
Reference in New Issue
Block a user