Update profile.html to tolerate SVGs

This is getting a little silly.
This commit is contained in:
Wolf Noble 2023-08-28 19:41:56 -05:00 committed by GitHub
parent f4e18cf468
commit 818e7dd007
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,12 +9,16 @@
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ if not $disableImageOptimization }}
{{ $authorImage = $authorImage.Fill "288x288" }}
{{- if not (eq $authorImage.MediaType.SubType "svg") -}}
{{ $authorImage = $authorImage.Fill "288x288" }}
{{- end -}}
{{ 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 }}"
/>