diff --git a/mixins/Sidebar.pixy b/mixins/Sidebar.pixy index b6b66e8e..390e300c 100644 --- a/mixins/Sidebar.pixy +++ b/mixins/Sidebar.pixy @@ -3,7 +3,7 @@ component Sidebar(user *arn.User) if user != nil Avatar(user) else - img.user-image.lazy(data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier") + img.user-image.lazy(src=utils.EmptyImage(), data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier") if user != nil SidebarButton("Home", "/animelist/watching", "home") diff --git a/utils/EmptyImage.go b/utils/EmptyImage.go new file mode 100644 index 00000000..f7c3edf7 --- /dev/null +++ b/utils/EmptyImage.go @@ -0,0 +1,6 @@ +package utils + +// EmptyImage returns the smallest possible 1x1 pixel image encoded in Base64. +func EmptyImage() string { + return "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" +}