1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-23 15:19:44 +02:00

feat: Preserve original format of images, change interpolation kernel

Closes #349
This commit is contained in:
Maksim Eltyshev 2022-12-24 00:47:59 +01:00
parent b82a601f46
commit 0a5210dd21
17 changed files with 212 additions and 103 deletions

View file

@ -49,10 +49,10 @@ module.exports = {
customToJSON() {
return {
..._.omit(this, ['dirname', 'filename']),
..._.omit(this, ['dirname', 'filename', 'image.thumbnailsExtension']),
url: `${sails.config.custom.attachmentsUrl}/${this.id}/download/${this.filename}`,
coverUrl: this.image
? `${sails.config.custom.attachmentsUrl}/${this.id}/download/thumbnails/cover-256.jpg`
? `${sails.config.custom.attachmentsUrl}/${this.id}/download/thumbnails/cover-256.${this.image.thumbnailsExtension}`
: null,
};
},