GIFs showing correctly in Notifications

face-detect
Noah Petherbridge 2023-06-25 23:09:43 -07:00
parent 7d4326e251
commit 7aa2310a6d
1 changed files with 7 additions and 0 deletions

View File

@ -411,9 +411,16 @@
<!-- Attached photo? -->
{{if $Body.PhotoID}}
<div class="column is-one-quarter">
<!-- GIF video? -->
{{if HasSuffix $Body.Photo.Filename ".mp4"}}
<video autoplay loop controls>
<source src="{{PhotoURL $Body.Photo.Filename}}" type="video/mp4">
</video>
{{else}}
<a href="/photo/view?id={{$Body.Photo.ID}}">
<img src="{{PhotoURL $Body.Photo.Filename}}">
</a>
{{end}}
{{if $Body.Photo.Caption}}
<small>{{$Body.Photo.Caption}}</small>