[chore/frontend] Use smaller webp images for logo and default avatars (#3119)

This commit is contained in:
tobi
2024-07-20 15:02:22 +02:00
committed by GitHub
parent 50c9b5498b
commit ad700c5029
34 changed files with 139 additions and 136 deletions

View File

@@ -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: