feat: convert images to png

This commit is contained in:
sixpointcube 2024-06-19 10:47:17 -04:00
parent 971a612ab1
commit da105625ff

View File

@ -20,9 +20,12 @@
{{ $matches := "feature,cover" }}
{{/* Use the value from front matter if present */}}
{{ with .Params.featured_image }}
{{/* This is the default case, the image lives in the static directory.
In which case we'll use the static dir */}}
{{ $linkToCover = trim . "/" | absURL }}
{{ $original := resources.Get . }}
{{ with $original }}
{{ $processed := .Process "webp" }}
{{ $linkToCover = $processed.RelPermalink }}
{{ end }}
{{/* If we find a Page Resource matching the exact value, we use it instead. */}}
{{ with $.Resources.GetMatch . }}
{{ $linkToCover = .RelPermalink }}