Unverified Commit 089e04bc authored by Lincoln Nogueira's avatar Lincoln Nogueira Committed by GitHub

chore: use webp compression on logo (#2756)

- Logo size reduced from 310 KB to 36 KB.
- Point metadata image URL to local logo instead of remote
parent 98762be1
......@@ -157,7 +157,7 @@ func getDefaultMetadata() *Metadata {
return &Metadata{
Title: "Memos",
Description: "A privacy-first, lightweight note-taking service. Easily capture and share your great thoughts.",
ImageURL: "https://www.usememos.com/logo.png",
ImageURL: "/logo.webp",
}
}
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/logo.png" type="image/*" />
<link rel="icon" href="/logo.webp" type="image/*" />
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f4f4f5" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#18181b" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
......
......@@ -78,7 +78,7 @@ const App = () => {
useEffect(() => {
document.title = systemStatus.customizedProfile.name;
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
link.href = systemStatus.customizedProfile.logoUrl || "/logo.png";
link.href = systemStatus.customizedProfile.logoUrl || "/logo.webp";
}, [systemStatus.customizedProfile]);
useEffect(() => {
......
......@@ -63,7 +63,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
const handleRestoreButtonClick = () => {
setPartialState({
name: "memos",
logoUrl: "/logo.png",
logoUrl: "/logo.webp",
description: "",
locale: "en",
appearance: "system",
......
......@@ -11,7 +11,7 @@ const UserAvatar = (props: Props) => {
<div className={classNames(`w-8 h-8 overflow-clip rounded-full`, className)}>
<img
className="w-full h-auto rounded-full shadow min-w-full min-h-full object-cover dark:opacity-80"
src={avatarUrl || "/logo.png"}
src={avatarUrl || "/logo.webp"}
decoding="async"
loading="lazy"
alt=""
......
......@@ -21,7 +21,7 @@ export const initialGlobalState = async () => {
memoDisplayWithUpdatedTs: false,
customizedProfile: {
name: "Memos",
logoUrl: "/logo.png",
logoUrl: "/logo.webp",
description: "",
locale: "en",
appearance: "system",
......@@ -37,7 +37,7 @@ export const initialGlobalState = async () => {
...data,
customizedProfile: {
name: customizedProfile.name || "Memos",
logoUrl: customizedProfile.logoUrl || "/logo.png",
logoUrl: customizedProfile.logoUrl || "/logo.webp",
description: customizedProfile.description,
locale: customizedProfile.locale || "en",
appearance: customizedProfile.appearance || "system",
......
......@@ -26,7 +26,7 @@ const globalSlice = createSlice({
memoDisplayWithUpdatedTs: false,
customizedProfile: {
name: "Memos",
logoUrl: "/logo.png",
logoUrl: "/logo.webp",
description: "",
locale: "en",
appearance: "system",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment