Handle SVG images

This commit is contained in:
Will Faught
2025-02-22 21:46:58 -08:00
parent 4490f8fc6d
commit fbcfd1124a
2 changed files with 9 additions and 5 deletions

View File

@@ -71,7 +71,9 @@
{{ $resource = partial "paige/func-resource.html" (dict "page" $page "url" $src) }}
{{ end }}
{{ if $resource }}
{{ $raster := ne $resource.MediaType.SubType "svg" }}
{{ if and $resource $raster }}
{{ $method := "" }}
{{ $options := slice }}
{{ $quality := "" }}
@@ -220,6 +222,8 @@
{{ end }}
{{ end }}
{{ end }}
{{ else if $resource }}
{{ $src = $resource.Permalink }}
{{ else }}
{{ $src = absLangURL $src }}
{{ end }}