better quality for images
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
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] image previews from external website
|
||||||
- [fix] docker-compose postgresql docs
|
- [fix] docker-compose postgresql docs
|
||||||
- [improve] export white logo to fediverse
|
- [improve] export white logo to fediverse
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const DiskStorage = {
|
|||||||
const thumbPath = path.resolve(config.upload_path, 'thumb', filename)
|
const thumbPath = path.resolve(config.upload_path, 'thumb', filename)
|
||||||
const outStream = fs.createWriteStream(finalPath)
|
const outStream = fs.createWriteStream(finalPath)
|
||||||
const thumbStream = fs.createWriteStream(thumbPath)
|
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 })
|
const thumbnailer = sharp().resize(400).jpeg({ quality: 90 })
|
||||||
|
|
||||||
file.stream.pipe(thumbnailer).pipe(thumbStream)
|
file.stream.pipe(thumbnailer).pipe(thumbStream)
|
||||||
|
|||||||
Reference in New Issue
Block a user