mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-25 02:04:15 +02:00
Merge pull request #558 from sam365724/patch-1
Change from jpg to more efficient webp thumbnails
This commit is contained in:
commit
70d1a04e1b
@ -121,7 +121,7 @@ export class PhotoProcessing {
|
||||
return path.join(
|
||||
ProjectPath.TranscodedFolder,
|
||||
ProjectPath.getRelativePathToImages(path.dirname(mediaPath)),
|
||||
file + '_' + size + '.jpg'
|
||||
file + '_' + size + '.webp'
|
||||
);
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ export class PhotoProcessing {
|
||||
.digest('hex') +
|
||||
'_' +
|
||||
size +
|
||||
'.jpg'
|
||||
'.webp'
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ export class ImageRendererFactory {
|
||||
fit: 'cover',
|
||||
});
|
||||
}
|
||||
await image.withMetadata().jpeg().toFile(input.outPath);
|
||||
await image.withMetadata().webp({effort: 6, quality: 60}).toFile(input.outPath);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user