summaryrefslogtreecommitdiff
path: root/web/template/profile.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'web/template/profile.tmpl')
-rw-r--r--web/template/profile.tmpl47
1 files changed, 34 insertions, 13 deletions
diff --git a/web/template/profile.tmpl b/web/template/profile.tmpl
index 256bbdccf..a06c842ab 100644
--- a/web/template/profile.tmpl
+++ b/web/template/profile.tmpl
@@ -94,14 +94,26 @@
alt="{{- template "avatarAlt" . -}}"
title="{{- template "avatarAlt" . -}}"
>
- <img
- class="avatar"
- src="{{- .account.Avatar -}}"
- alt="{{- template "avatarAlt" . -}}"
- title="{{- template "avatarAlt" . -}}"
- width="{{- template "avatarWidth" . -}}"
- height="{{- template "avatarHeight" . -}}"
- />
+ <picture
+ aria-hidden="true"
+ >
+ {{- if .account.AvatarAttachment }}
+ <source
+ class="avatar"
+ srcset="{{- .account.AvatarStatic -}}"
+ type="{{- .account.AvatarAttachment.PreviewMIMEType -}}"
+ media="(prefers-reduced-motion: reduce)"
+ />
+ {{- end }}
+ <img
+ class="avatar"
+ src="{{- .account.Avatar -}}"
+ alt="{{- template "avatarAlt" . -}}"
+ title="{{- template "avatarAlt" . -}}"
+ width="{{- template "avatarWidth" . -}}"
+ height="{{- template "avatarHeight" . -}}"
+ />
+ </picture>
</a>
</div>
{{- end }}
@@ -115,11 +127,20 @@
{{- include "profileMovedTo" . | indent 2 }}
{{- end }}
<div class="header-image-wrapper">
- <img
- src="{{- .account.Header -}}"
- alt="{{- template "headerAlt" . -}}"
- title="{{- template "headerAlt" . -}}"
- />
+ <picture>
+ {{- if .account.HeaderAttachment }}
+ <source
+ srcset="{{- .account.HeaderStatic -}}"
+ type="{{- .account.HeaderAttachment.PreviewMIMEType -}}"
+ media="(prefers-reduced-motion: reduce)"
+ />
+ {{- end }}
+ <img
+ src="{{- .account.Header -}}"
+ alt="{{- template "headerAlt" . -}}"
+ title="{{- template "headerAlt" . -}}"
+ />
+ </picture>
</div>
<div class="basic-info">
{{- with . }}