Update background.html to tolerate svg author images

This commit is contained in:
Wolf Noble 2023-08-28 21:06:03 -05:00 committed by GitHub
parent 818e7dd007
commit 1d103c1451
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,9 +23,11 @@
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ if not $disableImageOptimization }}
{{- if not (eq $authorImage.MediaType.SubType "svg") -}}
{{ $authorImage = $authorImage.Fill "288x288" }}
{{ end }}
<img class="mb-2 rounded-full h-36 w-36" width="144" height="144"
{{ end }}
<img class="mb-2 rounded-full h-36 w-36" {{- if not (eq $authorImage.MediaType.SubType "svg") -}} width="144" height="144" {{- end -}}
alt="{{ $.Site.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" />
{{ end }}
{{ end }}