Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
les
gancio
Commits
35f5c011
Commit
35f5c011
authored
Sep 27, 2019
by
les
Browse files
better quality for images
parent
bcf6dfde
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
35f5c011
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
server/api/storage.js
View file @
35f5c011
...
...
@@ -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
(
8
00
).
jpeg
({
quality
:
9
0
})
const
resizer
=
sharp
().
resize
(
12
00
).
jpeg
({
quality
:
9
5
})
const
thumbnailer
=
sharp
().
resize
(
400
).
jpeg
({
quality
:
90
})
file
.
stream
.
pipe
(
thumbnailer
).
pipe
(
thumbStream
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment