mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore/frontend] Use smaller webp images for logo and default avatars (#3119)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user