better quality for images

This commit is contained in:
les 2019-09-27 16:56:24 +02:00
parent bcf6dfde78
commit 35f5c0116f
2 changed files with 4 additions and 3 deletions

View file

@ -1,8 +1,9 @@
All notable changes to this project will be documented in this file.
### unreleased
- [improve] better quality for images
[unreleased]
### 0.14.17
- [fix] image previews from external website
- [fix] docker-compose postgresql docs
- [improve] export white logo to fediverse

View file

@ -19,7 +19,7 @@ const DiskStorage = {
const thumbPath = path.resolve(config.upload_path, 'thumb', filename)
const outStream = fs.createWriteStream(finalPath)
const thumbStream = fs.createWriteStream(thumbPath)
const resizer = sharp().resize(800).jpeg({ quality: 90 })
const resizer = sharp().resize(1200).jpeg({ quality: 95 })
const thumbnailer = sharp().resize(400).jpeg({ quality: 90 })
file.stream.pipe(thumbnailer).pipe(thumbStream)