summaryrefslogtreecommitdiff
path: root/internal/api/fileserver/servefile_test.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-07-19 15:28:43 +0000
committerLibravatar GitHub <noreply@github.com>2024-07-19 17:28:43 +0200
commit50c9b5498b9be266bd04278a97978e38984424a2 (patch)
treea371b4b5b8796af3f8262916c69e53b9c1e5af24 /internal/api/fileserver/servefile_test.go
parent[docs] update README with our corporate sponsorship policy (#3112) (diff)
downloadgotosocial-50c9b5498b9be266bd04278a97978e38984424a2.tar.xz
[feature] use webp for thumbnails (#3116)
* update to use webp for thumbnails * bump webp quality up to 40% from 12% (it's a bit different to jpeg quality setting) * update to use yuva colorspace, and use thumbnail=n=10 to select frame * fix missing comma in ffmpeg args * add links to appropriate ffmpeg docs * update tests * add file size tests for thumbnails --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/api/fileserver/servefile_test.go')
-rw-r--r--internal/api/fileserver/servefile_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/api/fileserver/servefile_test.go b/internal/api/fileserver/servefile_test.go
index cb3a35e45..9cd1517e2 100644
--- a/internal/api/fileserver/servefile_test.go
+++ b/internal/api/fileserver/servefile_test.go
@@ -122,11 +122,11 @@ func (suite *ServeFileTestSuite) TestServeSmallLocalFileOK() {
targetAttachment.AccountID,
media.TypeAttachment,
media.SizeSmall,
- targetAttachment.ID+".jpg",
+ targetAttachment.ID+".webp",
)
suite.Equal(http.StatusOK, code)
- suite.Equal("image/jpeg", headers.Get("content-type"))
+ suite.Equal("image/webp", headers.Get("content-type"))
suite.Equal(fileInStorage, body)
}
@@ -162,11 +162,11 @@ func (suite *ServeFileTestSuite) TestServeSmallRemoteFileOK() {
targetAttachment.AccountID,
media.TypeAttachment,
media.SizeSmall,
- targetAttachment.ID+".jpg",
+ targetAttachment.ID+".webp",
)
suite.Equal(http.StatusOK, code)
- suite.Equal("image/jpeg", headers.Get("content-type"))
+ suite.Equal("image/webp", headers.Get("content-type"))
suite.Equal(fileInStorage, body)
}
@@ -208,11 +208,11 @@ func (suite *ServeFileTestSuite) TestServeSmallRemoteFileRecache() {
targetAttachment.AccountID,
media.TypeAttachment,
media.SizeSmall,
- targetAttachment.ID+".jpg",
+ targetAttachment.ID+".webp",
)
suite.Equal(http.StatusOK, code)
- suite.Equal("image/jpeg", headers.Get("content-type"))
+ suite.Equal("image/webp", headers.Get("content-type"))
suite.Equal(fileInStorage, body)
}
@@ -252,7 +252,7 @@ func (suite *ServeFileTestSuite) TestServeSmallRemoteFileRecacheNotFound() {
targetAttachment.AccountID,
media.TypeAttachment,
media.SizeSmall,
- targetAttachment.ID+".jpg",
+ targetAttachment.ID+".webp",
)
suite.Equal(http.StatusNotFound, code)