mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 09:13:23 +03:00
Set best image quality for all uploads. Closes #114
This commit is contained in:
@@ -31,8 +31,20 @@ module.exports = {
|
||||
);
|
||||
|
||||
try {
|
||||
const originalBuffer = await sharp(buffer).jpeg().toBuffer();
|
||||
const cover336Buffer = await sharp(buffer).resize(336, 200).jpeg().toBuffer();
|
||||
const originalBuffer = await sharp(buffer)
|
||||
.jpeg({
|
||||
quality: 100,
|
||||
chromaSubsampling: '4:4:4',
|
||||
})
|
||||
.toBuffer();
|
||||
|
||||
const cover336Buffer = await sharp(buffer)
|
||||
.resize(336, 200)
|
||||
.jpeg({
|
||||
quality: 100,
|
||||
chromaSubsampling: '4:4:4',
|
||||
})
|
||||
.toBuffer();
|
||||
|
||||
const dirname = uuid();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user