mirror of
https://github.com/plankanban/planka.git
synced 2025-07-24 23:59:48 +02:00
Set best image quality for all uploads. Closes #114
This commit is contained in:
parent
141fc74dbb
commit
fb42ed460e
4 changed files with 42 additions and 11 deletions
|
@ -31,8 +31,20 @@ module.exports = {
|
|||
);
|
||||
|
||||
try {
|
||||
const originalBuffer = await sharp(buffer).jpeg().toBuffer();
|
||||
const square100Buffer = await sharp(buffer).resize(100, 100).jpeg().toBuffer();
|
||||
const originalBuffer = await sharp(buffer)
|
||||
.jpeg({
|
||||
quality: 100,
|
||||
chromaSubsampling: '4:4:4',
|
||||
})
|
||||
.toBuffer();
|
||||
|
||||
const square100Buffer = await sharp(buffer)
|
||||
.resize(100, 100)
|
||||
.jpeg({
|
||||
quality: 100,
|
||||
chromaSubsampling: '4:4:4',
|
||||
})
|
||||
.toBuffer();
|
||||
|
||||
const dirname = uuid();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue