Update author-extra.html to tolerate SVGs

This commit is contained in:
Wolf Noble 2023-08-28 19:36:40 -05:00 committed by GitHub
parent 8cf476e37e
commit f4e18cf468
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,9 @@
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ if not $disableImageOptimization }}
{{ $authorImage = $authorImage.Fill "192x192" }}
{{ if not (eq $authorImage.MediaType.SubType "svg") -}}
{{ $authorImage = $authorImage.Fill "192x192" }}
{{ end }}
{{ end }}
<img class="!mt-0 !mb-0 h-24 w-24 rounded-full ltr:mr-4 rtl:ml-4" width="96" height="96"
src="{{ $authorImage.RelPermalink }}" />
@ -34,4 +36,4 @@
</div>
</div>
</div>
</div>
</div>