[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
commit ad700c5029
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 139 additions and 136 deletions

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 B

BIN
web/assets/logo.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -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();

View file

@ -62,7 +62,7 @@
/>
{{- else }}
<img
src="/assets/logo.png"
src="/assets/logo.webp"
loading="lazy"
{{- if .Description }}
alt="{{- .Description -}}"
@ -134,7 +134,7 @@ media photoswipe-gallery {{ (len .) | oddOrEven }} {{ if eq (len .) 1 }}single{{
data-pswp-width="{{- $media.Meta.Small.Width -}}px"
data-pswp-height="{{- $media.Meta.Small.Height -}}px"
{{- else }}
poster="/assets/logo.png"
poster="/assets/logo.webp"
width="518px"
height="460px"
{{- end }}