diff --git a/README.md b/README.md index f30b5c2bf..d35311f87 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ GoToSocial is an [ActivityPub](https://activitypub.rocks/) social network server With GoToSocial, you can keep in touch with your friends, post, read, and share images and articles. All without being tracked or advertised to!

- +

**GoToSocial is still [ALPHA SOFTWARE](https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha)**. It is already deployable and useable, and it federates cleanly with many other Fediverse servers (not yet all). However, many things are not yet implemented, and there are plenty of bugs! We foresee entering beta around the beginning of 2024. @@ -53,6 +53,7 @@ Here's a screenshot of the instance landing page! - [Special Thanks](#special-thanks) - [Sponsorship + Funding](#sponsorship--funding) - [Crowdfunding](#crowdfunding) + - [Corporate Sponsorship](#corporate-sponsorship) - [NLnet](#nlnet) - [License](#license) @@ -311,6 +312,7 @@ Sloth logo by [Anna Abramek](https://abramek.art/). The Creative Commons Attribution-ShareAlike 4.0 International License license applies specifically to the following files and subdirectories of this repository: - [sloth logo png](https://github.com/superseriousbusiness/gotosocial/blob/main/web/assets/logo.png) +- [sloth logo webp](https://github.com/superseriousbusiness/gotosocial/blob/main/web/assets/logo.webp) - [sloth logo svg](https://github.com/superseriousbusiness/gotosocial/blob/main/web/assets/logo.svg) - [all default avatars](https://github.com/superseriousbusiness/gotosocial/blob/main/web/assets/default_avatars) diff --git a/docs/assets/sloth.png b/docs/assets/sloth.png deleted file mode 100644 index 2e46dbe35..000000000 Binary files a/docs/assets/sloth.png and /dev/null differ diff --git a/docs/assets/sloth.webp b/docs/assets/sloth.webp new file mode 100644 index 000000000..d689d042d Binary files /dev/null and b/docs/assets/sloth.webp differ diff --git a/internal/api/client/accounts/profile_test.go b/internal/api/client/accounts/profile_test.go index 62a622b37..f6d97c014 100644 --- a/internal/api/client/accounts/profile_test.go +++ b/internal/api/client/accounts/profile_test.go @@ -119,7 +119,7 @@ func (suite *AccountProfileTestSuite) TestDeleteHeader() { http.StatusOK, ) if suite.NoError(err) { - suite.Equal("http://localhost:8080/assets/default_header.png", account.Header) + suite.Equal("http://localhost:8080/assets/default_header.webp", account.Header) } } @@ -132,7 +132,7 @@ func (suite *AccountProfileTestSuite) TestDeleteNonexistentHeader() { http.StatusOK, ) if suite.NoError(err) { - suite.Equal("http://localhost:8080/assets/default_header.png", account.Header) + suite.Equal("http://localhost:8080/assets/default_header.webp", account.Header) } } diff --git a/internal/api/client/admin/accountsgetv2_test.go b/internal/api/client/admin/accountsgetv2_test.go index acf12fd31..15eb8534b 100644 --- a/internal/api/client/admin/accountsgetv2_test.go +++ b/internal/api/client/admin/accountsgetv2_test.go @@ -90,8 +90,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -147,8 +147,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -193,8 +193,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://localhost:8080/@localhost:8080", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -282,8 +282,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://localhost:8080/@weed_lord420", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -327,8 +327,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://example.org/@Some_User", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 1, @@ -368,8 +368,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -451,8 +451,8 @@ func (suite *AccountsGetTestSuite) TestAccountsGetFromTop() { "url": "https://xn--xample-ova.org/users/@%C3%BCser", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -531,8 +531,8 @@ func (suite *AccountsGetTestSuite) TestAccountsMinID() { "url": "http://localhost:8080/@localhost:8080", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, diff --git a/internal/api/client/admin/reportsget_test.go b/internal/api/client/admin/reportsget_test.go index ea5375314..ebcd799f8 100644 --- a/internal/api/client/admin/reportsget_test.go +++ b/internal/api/client/admin/reportsget_test.go @@ -177,8 +177,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -218,8 +218,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -275,8 +275,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -321,8 +321,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -380,8 +380,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -437,8 +437,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -484,8 +484,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetAll() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -622,8 +622,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -679,8 +679,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -726,8 +726,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetCreatedByAccount() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -864,8 +864,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -921,8 +921,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -968,8 +968,8 @@ func (suite *ReportsGetTestSuite) TestReportsGetTargetAccount() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, diff --git a/internal/api/client/followrequests/get_test.go b/internal/api/client/followrequests/get_test.go index 35e4488c3..b9b6db7c6 100644 --- a/internal/api/client/followrequests/get_test.go +++ b/internal/api/client/followrequests/get_test.go @@ -95,8 +95,8 @@ func (suite *GetTestSuite) TestGet() { "url": "http://example.org/@Some_User", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 1, diff --git a/internal/api/client/instance/instancepatch_test.go b/internal/api/client/instance/instancepatch_test.go index 65a10d192..ba0d026f3 100644 --- a/internal/api/client/instance/instancepatch_test.go +++ b/internal/api/client/instance/instancepatch_test.go @@ -151,7 +151,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -165,8 +165,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -285,7 +285,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -299,8 +299,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -419,7 +419,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -433,8 +433,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -604,7 +604,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -618,8 +618,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -776,8 +776,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch8() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -931,7 +931,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -945,8 +945,8 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, diff --git a/internal/api/client/mutes/mutesget_test.go b/internal/api/client/mutes/mutesget_test.go index 2e5a00c6a..9939174a0 100644 --- a/internal/api/client/mutes/mutesget_test.go +++ b/internal/api/client/mutes/mutesget_test.go @@ -148,7 +148,7 @@ func (suite *MutesTestSuite) TestIndefinitelyMutedAccountSerializesMuteExpiratio // Fetch all muted accounts for the logged-in account. // The expected body contains `"mute_expires_at":null`. - _, err = suite.getMutedAccounts(http.StatusOK, `[{"id":"01F8MH5ZK5VRH73AKHQM6Y9VNX","username":"foss_satan","acct":"foss_satan@fossbros-anonymous.io","display_name":"big gerald","locked":false,"discoverable":true,"bot":false,"created_at":"2021-09-26T10:52:36.000Z","note":"i post about like, i dunno, stuff, or whatever!!!!","url":"http://fossbros-anonymous.io/@foss_satan","avatar":"","avatar_static":"","header":"http://localhost:8080/assets/default_header.png","header_static":"http://localhost:8080/assets/default_header.png","followers_count":0,"following_count":0,"statuses_count":3,"last_status_at":"2021-09-11T09:40:37.000Z","emojis":[],"fields":[],"mute_expires_at":null}]`) + _, err = suite.getMutedAccounts(http.StatusOK, `[{"id":"01F8MH5ZK5VRH73AKHQM6Y9VNX","username":"foss_satan","acct":"foss_satan@fossbros-anonymous.io","display_name":"big gerald","locked":false,"discoverable":true,"bot":false,"created_at":"2021-09-26T10:52:36.000Z","note":"i post about like, i dunno, stuff, or whatever!!!!","url":"http://fossbros-anonymous.io/@foss_satan","avatar":"","avatar_static":"","header":"http://localhost:8080/assets/default_header.webp","header_static":"http://localhost:8080/assets/default_header.webp","followers_count":0,"following_count":0,"statuses_count":3,"last_status_at":"2021-09-11T09:40:37.000Z","emojis":[],"fields":[],"mute_expires_at":null}]`) if err != nil { suite.FailNow(err.Error()) } diff --git a/internal/api/client/reports/reportget_test.go b/internal/api/client/reports/reportget_test.go index 4f01101b2..6b0cf89e0 100644 --- a/internal/api/client/reports/reportget_test.go +++ b/internal/api/client/reports/reportget_test.go @@ -125,8 +125,8 @@ func (suite *ReportGetTestSuite) TestGetReport1() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, diff --git a/internal/api/client/reports/reportsget_test.go b/internal/api/client/reports/reportsget_test.go index 2413292a0..96fcafc22 100644 --- a/internal/api/client/reports/reportsget_test.go +++ b/internal/api/client/reports/reportsget_test.go @@ -151,8 +151,8 @@ func (suite *ReportsGetTestSuite) TestGetReports() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -241,8 +241,8 @@ func (suite *ReportsGetTestSuite) TestGetReports4() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -315,8 +315,8 @@ func (suite *ReportsGetTestSuite) TestGetReports6() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -373,8 +373,8 @@ func (suite *ReportsGetTestSuite) TestGetReports7() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, diff --git a/internal/processing/stream/notification_test.go b/internal/processing/stream/notification_test.go index e12f23abe..2e83714fa 100644 --- a/internal/processing/stream/notification_test.go +++ b/internal/processing/stream/notification_test.go @@ -74,8 +74,8 @@ func (suite *NotificationTestSuite) TestStreamNotification() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, diff --git a/internal/processing/stream/statusupdate_test.go b/internal/processing/stream/statusupdate_test.go index da32be48b..2ae3f217b 100644 --- a/internal/processing/stream/statusupdate_test.go +++ b/internal/processing/stream/statusupdate_test.go @@ -85,8 +85,8 @@ func (suite *StatusUpdateTestSuite) TestStreamNotification() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, diff --git a/internal/typeutils/defaulticons.go b/internal/typeutils/defaulticons.go index e3a090109..88785879c 100644 --- a/internal/typeutils/defaulticons.go +++ b/internal/typeutils/defaulticons.go @@ -28,7 +28,7 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/log" ) -const defaultHeaderPath = "/assets/default_header.png" +const defaultHeaderPath = "/assets/default_header.webp" // populateDefaultAvatars returns a slice of standard avatars found // in the path [web-assets-base-dir]/default_avatars. The slice @@ -73,7 +73,7 @@ func populateDefaultAvatars() (defaultAvatars []string) { // take only files with simple extensions // that we know will work OK as avatars switch strings.ToLower(extension) { - case "jpeg", "jpg", "gif", "png": + case "jpeg", "jpg", "gif", "png", "webp": avatarURL := config.GetProtocol() + "://" + config.GetHost() + "/assets/default_avatars/" + fileName defaultAvatars = append(defaultAvatars, avatarURL) default: diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index f11c4af21..f64f4acff 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -1466,7 +1466,7 @@ func (c *Converter) InstanceToAPIV1Instance(ctx context.Context, i *gtsmodel.Ins instance.ThumbnailType = iAccount.AvatarMediaAttachment.File.ContentType instance.ThumbnailDescription = iAccount.AvatarMediaAttachment.Description } else { - instance.Thumbnail = config.GetProtocol() + "://" + i.Domain + "/assets/logo.png" // default thumb + instance.Thumbnail = config.GetProtocol() + "://" + i.Domain + "/assets/logo.webp" // default thumb } // contact account @@ -1536,7 +1536,7 @@ func (c *Converter) InstanceToAPIV2Instance(ctx context.Context, i *gtsmodel.Ins thumbnail.Description = iAccount.AvatarMediaAttachment.Description thumbnail.Blurhash = iAccount.AvatarMediaAttachment.Blurhash } else { - thumbnail.URL = config.GetProtocol() + "://" + i.Domain + "/assets/logo.png" // default thumb + thumbnail.URL = config.GetProtocol() + "://" + i.Domain + "/assets/logo.webp" // default thumb } instance.Thumbnail = thumbnail diff --git a/internal/typeutils/internaltofrontend_test.go b/internal/typeutils/internaltofrontend_test.go index f335e6fce..aeb7ea0b9 100644 --- a/internal/typeutils/internaltofrontend_test.go +++ b/internal/typeutils/internaltofrontend_test.go @@ -149,8 +149,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendAliasedAndMoved() "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -350,8 +350,8 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendPublicPunycode() "url": "https://xn--xample-ova.org/users/@%C3%BCser", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -388,8 +388,8 @@ func (suite *InternalToFrontendTestSuite) TestLocalInstanceAccountToFrontendPubl "url": "http://localhost:8080/@localhost:8080", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -426,8 +426,8 @@ func (suite *InternalToFrontendTestSuite) TestLocalInstanceAccountToFrontendBloc "url": "http://localhost:8080/@localhost:8080", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -484,8 +484,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToFrontend() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -633,8 +633,8 @@ func (suite *InternalToFrontendTestSuite) TestWarnFilteredStatusToFrontend() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -866,8 +866,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToFrontendUnknownAttachments "url": "http://example.org/@Some_User", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 1, @@ -994,8 +994,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToWebStatus() { "url": "http://example.org/@Some_User", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 1, @@ -1155,8 +1155,8 @@ func (suite *InternalToFrontendTestSuite) TestStatusToFrontendUnknownLanguage() "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -1471,7 +1471,7 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV1ToFrontend() { "status_count": 20, "user_count": 4 }, - "thumbnail": "http://localhost:8080/assets/logo.png", + "thumbnail": "http://localhost:8080/assets/logo.webp", "contact_account": { "id": "01F8MH17FWEB39HZJ76B6VXSKF", "username": "admin", @@ -1485,8 +1485,8 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV1ToFrontend() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -1535,7 +1535,7 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV2ToFrontend() { } }, "thumbnail": { - "url": "http://localhost:8080/assets/logo.png" + "url": "http://localhost:8080/assets/logo.webp" }, "languages": [ "nl", @@ -1619,8 +1619,8 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV2ToFrontend() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -1735,8 +1735,8 @@ func (suite *InternalToFrontendTestSuite) TestReportToFrontend1() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -1778,8 +1778,8 @@ func (suite *InternalToFrontendTestSuite) TestReportToFrontend2() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -1853,8 +1853,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -1894,8 +1894,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -1951,8 +1951,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -1997,8 +1997,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend1() { "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -2066,8 +2066,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend2() { "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 8, @@ -2123,8 +2123,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend2() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -2170,8 +2170,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontend2() { "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -2321,8 +2321,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontendSuspendedLoca "url": "http://fossbros-anonymous.io/@foss_satan", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 3, @@ -2362,8 +2362,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontendSuspendedLoca "url": "http://localhost:8080/@1happyturtle", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 0, "following_count": 0, "statuses_count": 0, @@ -2408,8 +2408,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontendSuspendedLoca "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, @@ -2454,8 +2454,8 @@ func (suite *InternalToFrontendTestSuite) TestAdminReportToFrontendSuspendedLoca "url": "http://localhost:8080/@admin", "avatar": "", "avatar_static": "", - "header": "http://localhost:8080/assets/default_header.png", - "header_static": "http://localhost:8080/assets/default_header.png", + "header": "http://localhost:8080/assets/default_header.webp", + "header_static": "http://localhost:8080/assets/default_header.webp", "followers_count": 1, "following_count": 1, "statuses_count": 4, diff --git a/web/assets/LICENSE b/web/assets/LICENSE index 58141d59b..23765bf59 100644 --- a/web/assets/LICENSE +++ b/web/assets/LICENSE @@ -1,6 +1,7 @@ The following files and subdirectories in this directory are licensed under the Creative Commons Attribution-ShareAlike 4.0 International License: - logo.png (sloth logo) +- logo.webp (sloth logo) - logo.svg (sloth logo) - ./default_avatars/* (all default avatars) diff --git a/web/assets/default_avatars/GoToSocial_icon1.png b/web/assets/default_avatars/GoToSocial_icon1.png deleted file mode 100644 index bdf037ad3..000000000 Binary files a/web/assets/default_avatars/GoToSocial_icon1.png and /dev/null differ diff --git a/web/assets/default_avatars/GoToSocial_icon1.webp b/web/assets/default_avatars/GoToSocial_icon1.webp new file mode 100644 index 000000000..4cab81021 Binary files /dev/null and b/web/assets/default_avatars/GoToSocial_icon1.webp differ diff --git a/web/assets/default_avatars/GoToSocial_icon2.png b/web/assets/default_avatars/GoToSocial_icon2.png deleted file mode 100644 index 95a6c1d71..000000000 Binary files a/web/assets/default_avatars/GoToSocial_icon2.png and /dev/null differ diff --git a/web/assets/default_avatars/GoToSocial_icon2.webp b/web/assets/default_avatars/GoToSocial_icon2.webp new file mode 100644 index 000000000..9f63cfc7e Binary files /dev/null and b/web/assets/default_avatars/GoToSocial_icon2.webp differ diff --git a/web/assets/default_avatars/GoToSocial_icon3.png b/web/assets/default_avatars/GoToSocial_icon3.png deleted file mode 100644 index b06dae401..000000000 Binary files a/web/assets/default_avatars/GoToSocial_icon3.png and /dev/null differ diff --git a/web/assets/default_avatars/GoToSocial_icon3.webp b/web/assets/default_avatars/GoToSocial_icon3.webp new file mode 100644 index 000000000..03d05aca1 Binary files /dev/null and b/web/assets/default_avatars/GoToSocial_icon3.webp differ diff --git a/web/assets/default_avatars/GoToSocial_icon4.png b/web/assets/default_avatars/GoToSocial_icon4.png deleted file mode 100644 index 4b066f28f..000000000 Binary files a/web/assets/default_avatars/GoToSocial_icon4.png and /dev/null differ diff --git a/web/assets/default_avatars/GoToSocial_icon4.webp b/web/assets/default_avatars/GoToSocial_icon4.webp new file mode 100644 index 000000000..a2fe7174b Binary files /dev/null and b/web/assets/default_avatars/GoToSocial_icon4.webp differ diff --git a/web/assets/default_avatars/GoToSocial_icon5.png b/web/assets/default_avatars/GoToSocial_icon5.png deleted file mode 100644 index ce3bb05c3..000000000 Binary files a/web/assets/default_avatars/GoToSocial_icon5.png and /dev/null differ diff --git a/web/assets/default_avatars/GoToSocial_icon5.webp b/web/assets/default_avatars/GoToSocial_icon5.webp new file mode 100644 index 000000000..fcb8626d6 Binary files /dev/null and b/web/assets/default_avatars/GoToSocial_icon5.webp differ diff --git a/web/assets/default_avatars/GoToSocial_icon6.png b/web/assets/default_avatars/GoToSocial_icon6.png deleted file mode 100644 index b79c39749..000000000 Binary files a/web/assets/default_avatars/GoToSocial_icon6.png and /dev/null differ diff --git a/web/assets/default_avatars/GoToSocial_icon6.webp b/web/assets/default_avatars/GoToSocial_icon6.webp new file mode 100644 index 000000000..10fa63bb1 Binary files /dev/null and b/web/assets/default_avatars/GoToSocial_icon6.webp differ diff --git a/web/assets/default_header.png b/web/assets/default_header.png deleted file mode 100644 index 3e1430802..000000000 Binary files a/web/assets/default_header.png and /dev/null differ diff --git a/web/assets/default_header.webp b/web/assets/default_header.webp new file mode 100644 index 000000000..52f47e14d Binary files /dev/null and b/web/assets/default_header.webp differ diff --git a/web/assets/logo.webp b/web/assets/logo.webp new file mode 100644 index 000000000..d689d042d Binary files /dev/null and b/web/assets/logo.webp differ diff --git a/web/source/settings/components/status.tsx b/web/source/settings/components/status.tsx index 56b061d39..ba38e161c 100644 --- a/web/source/settings/components/status.tsx +++ b/web/source/settings/components/status.tsx @@ -24,7 +24,7 @@ import sanitize from "sanitize-html"; export function FakeStatus({ children }) { const { data: account = { - avatar: "/assets/default_avatars/GoToSocial_icon1.png", + avatar: "/assets/default_avatars/GoToSocial_icon1.webp", display_name: "", username: "" } } = useVerifyCredentialsQuery(); diff --git a/web/template/status_attachments.tmpl b/web/template/status_attachments.tmpl index 5df3d1c5c..8e05aafd8 100644 --- a/web/template/status_attachments.tmpl +++ b/web/template/status_attachments.tmpl @@ -62,7 +62,7 @@ /> {{- else }}